Justa Lol
Jan 11th, 2009, 12:35 AM
Button1 = new JButton("Button1 ");
Button1.setSize(100, 30);
Button1.setLocation(300, 100);
frame.add(Button1);
Button2 = new JButton("Button2 ");
Button2.setSize(100, 30);
Button2.setLocation(200, 100);
frame.add(Button2);
Button3 = new JButton("Button3 ");
Button3.setSize(100, 30);
Button3.setLocation(100, 100);
frame.add(Button3);
i use that code, the problem is that button3 will cover everything while button 1 and 2 will go where i told them to go... like button3 somehow will become the background... can someone tell me how to fix that?
edit:
if i made it
the Button2 = new JButton("Button2 "); and Button1 = new JButton("Button1 "); and so on in top it would work
Button1.setSize(100, 30);
Button1.setLocation(300, 100);
frame.add(Button1);
Button2 = new JButton("Button2 ");
Button2.setSize(100, 30);
Button2.setLocation(200, 100);
frame.add(Button2);
Button3 = new JButton("Button3 ");
Button3.setSize(100, 30);
Button3.setLocation(100, 100);
frame.add(Button3);
i use that code, the problem is that button3 will cover everything while button 1 and 2 will go where i told them to go... like button3 somehow will become the background... can someone tell me how to fix that?
edit:
if i made it
the Button2 = new JButton("Button2 "); and Button1 = new JButton("Button1 "); and so on in top it would work