Click here to Skip to main content
15,848,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
class login extends JFrame
{
public static void main(String args[])
{
JFrame f1;
JLabel l1,l2,l3;
JButton sign,cancle;
f1 =new JFrame();

l1= new JLabel("hi");
f1.add(l1);
l1.setBounds(170,40,75,25);
f1.setSize(500,500);
f1.setVisible(true);
f1.setLayout(null);
}

}
why this code cant work i cant set label position with using setbound method ??
After executing this code the lable set as at default position although i set position of lable with setbound method..!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900