Results 1 to 3 of 3
Thread: gridbaglayout question
- 01-06-2012, 03:43 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 10
- Rep Power
- 0
gridbaglayout question
Im learning how to use the gridbag layout, so far have got 8 JLabels underneath each other.
Have set the gridy's respectively, but...
The labels are all in the middle of the JFrame and are justified to the center like a tree.
What am I missing, I thought that if you set the gridx to 0 it would start from topleft?
How can I justify everything to the left?
Im guessing this is school boy stuff otherwise i can paste my code
- 01-06-2012, 06:29 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,143
- Rep Power
- 5
Re: gridbaglayout question
See: How to Use GridBagLayout (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)
Look for the section that explains how the weightx, weighty constraints work.
- 01-06-2012, 09:08 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
GridBagLayout vs me: 1 - 0
By JosAH in forum AWT / SwingReplies: 9Last Post: 08-19-2011, 09:18 PM -
GridBagLayout.... help!!!!
By eiramae in forum Java AppletsReplies: 5Last Post: 02-26-2011, 03:19 PM -
GridBagLayout Help
By Zman3359 in forum AWT / SwingReplies: 0Last Post: 02-21-2011, 08:39 PM -
[AWT] GridBagLayout Help.
By Sandia_man in forum AWT / SwingReplies: 2Last Post: 05-23-2010, 08:54 PM -
help with gridbaglayout
By robertbob in forum AWT / SwingReplies: 5Last Post: 05-18-2010, 04:14 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks