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..!!