Results 1 to 1 of 1

Thread: [RESOLVED] placing objects problem

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Resolved [RESOLVED] placing objects problem

    Code:
    		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
    Last edited by Justa Lol; Jan 11th, 2009 at 02:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width