Hello forum:
I have to set the position of 4 labels, though in this example I'm only starting with one. for some reason even though I do setLocation(40,50) it is not working. Any ideas?
The code of the small part ; If you guys want the entire program Ill post it. Thanks
static JLabel label,label2; static JTextField search; static JButton button;
public Driver(){
setLayout(new FlowLayout());
label = new JLabel("Search");
add(label);
search= new JTextField("Name of the snake");
add(search);
button = new JButton("Find");
button.setHorizontalAlignment(SwingConstants.CENTER);
add(button);
label2 = new JLabel("Name");
label2.setLocation(10,50);
label2.setHorizontalAlignment(SwingConstants.CENTER);
add(label2);
}