Results 1 to 6 of 6

Thread: GUI alignment

  1. #1
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default GUI alignment



    I am trying to create a GUI with this layout. Any quick suggestion on what I should use to achieve it. Specific details are unnecessary since i can always google for the specifics. All I need is a general idea of how I can go about getting about this alignment.

    Many thanks in advance.

  2. #2
    milovan is offline Senior Member
    Join Date
    Jan 2011
    Location
    Belgrade, Serbia
    Posts
    301
    Rep Power
    4

    Default

    use netbeans :-)

  3. #3
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    ha ha ha, I'm still a novice so I prefer to code by hand. Come on milovan, spare a moment.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Nah don't use NetBeans as you will not learn the ins and outs of Swing this way.

    One possible way: consider creating a main JPanel that uses a BorderLayout with the Basket in the BorderLayout.EAST position and everything else in a JPanel in the BorderLayout.CENTER position. Everything else can go into a JPanel that uses a GridBagLayout, but you'll need to add empty JLabels to fill up the blank spaces. Again this GridBag panel can go BorderLayout.CENTER into the main JPanel.

  5. #5
    milovan is offline Senior Member
    Join Date
    Jan 2011
    Location
    Belgrade, Serbia
    Posts
    301
    Rep Power
    4

    Default

    Well, if there is nothing new in java I guess GridBagLayout can be the answer. But I'm little rusty with this after IDE came in my life.

    Take a look at:
    How to Use GridBagLayout (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)

  6. #6
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    Thanks guys, makes me wanna sing: "Oh where would an africanhacker be without these ever so kind forums, Oh where would I be, nowhere, nowhere, nowhere."

Similar Threads

  1. Alignment in GridLayout
    By Zamereon in forum AWT / Swing
    Replies: 2
    Last Post: 02-27-2011, 11:49 AM
  2. pls... help.... alignment....
    By eiramae in forum Java Applets
    Replies: 0
    Last Post: 02-26-2011, 06:47 AM
  3. Help with alignment
    By firecat318 in forum AWT / Swing
    Replies: 3
    Last Post: 05-25-2010, 03:01 AM
  4. Alignment using BoxLayout
    By tiptoe in forum AWT / Swing
    Replies: 4
    Last Post: 01-23-2010, 07:15 PM
  5. alignment of textfield in awt
    By nitinborge5 in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 11:16 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
  •