Results 1 to 3 of 3
Thread: Layout images
- 05-17-2010, 10:28 PM #1
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
Layout images
Hi I want put five JLabel in a Container in this mode: link
Can you give me the right layout?
I use GridLayout but the result isn't good.Last edited by DarioDep; 05-18-2010 at 04:12 PM.
- 05-17-2010, 11:44 PM #2
Senior Member
- Join Date
- Mar 2010
- Posts
- 266
- Rep Power
- 4
take a look here: A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)
try BorderLayout:
in NORTH, have a panel with label in the middle
in the WEST, have a panel with one button in the middle
in the EAST, have a panel with one button in the middle
in the CENTER, have the table image
in the SOUTH, have a panel with two buttons, width struts on either side.
for all panels but CENTER you may want to use BoxLayout, also look at Box.createVerticalStrut() and Box.createVerticalGlue() methods.
- 05-18-2010, 04:10 PM #3
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Edit layout Layout please help me
By manhtungtnk28@gmail.com in forum New To JavaReplies: 4Last Post: 11-23-2009, 08:41 AM -
Layout manager
By Nicholas Jordan in forum Java AppletsReplies: 2Last Post: 11-24-2008, 03:02 PM -
Help with JButton and layout
By adlb1300 in forum AWT / SwingReplies: 1Last Post: 12-25-2007, 08:33 AM -
Layout Managers
By gmioannou in forum AWT / SwingReplies: 1Last Post: 12-24-2007, 04:12 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks