This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: GridBagLayout problem
 
Similar Threads
how to set this a borderq
help on reading textfield on 1 class from another class and using it to create a file
GridBagLayout:: a few Qs
GridBagConstraints Problem
help automate code