aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes GridBagLayout problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GridBagLayout problem" Watch "GridBagLayout problem" New topic
Author

GridBagLayout problem

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i'm trying to build the following:

lbl1 txt1 bt1 bt2 bt3 bt4
lbl2 txt2 bt5 bt6

but when i try to add button bt5 it allways goes right to bt4 right side!

here's my code:


i tried several constraints variations but with no result

How can i solve this?

TiA


java amateur
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
panel.add(new JButton("Actualizar"));
panel.add(new JButton("Actualizar"),c);//add the constraint
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
of course!

thanks
 
jQuery in Action, 2nd edition
 
subject: GridBagLayout problem
 
Similar Threads
how to set this a borderq
GridBagLayout:: a few Qs
help on reading textfield on 1 class from another class and using it to create a file
help automate code
GridBagConstraints Problem