Results 1 to 3 of 3

Thread: Layout images

  1. #1
    DarioDep is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default 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 05:12 PM.

  2. #2
    iluxa is offline Senior Member
    Join Date
    Mar 2010
    Posts
    266
    Rep Power
    5

    Default

    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.

  3. #3
    DarioDep is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

Similar Threads

  1. Edit layout Layout please help me
    By manhtungtnk28@gmail.com in forum New To Java
    Replies: 4
    Last Post: 11-23-2009, 09:41 AM
  2. Layout manager
    By Nicholas Jordan in forum Java Applets
    Replies: 2
    Last Post: 11-24-2008, 04:02 PM
  3. Help with JButton and layout
    By adlb1300 in forum AWT / Swing
    Replies: 1
    Last Post: 12-25-2007, 09:33 AM
  4. Layout Managers
    By gmioannou in forum AWT / Swing
    Replies: 1
    Last Post: 12-24-2007, 05:12 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
  •