Results 1 to 5 of 5
  1. #1
    random7 is offline Member
    Join Date
    Jul 2010
    Posts
    11
    Rep Power
    0

    Default group layout - span ?

    Hello,


    im trying to make a gui in which i want the following components layed out like this (using group layout):


    But i dont know how to get the "löschen" button below the "neu" button.
    I always end up like this:



    Is there a way to tell the JTextArea to take up 2 columns (similar to the grid layout), or is it impossible to make such a layout using grouplayout?

    Thanks for any help :)

  2. #2
    random7 is offline Member
    Join Date
    Jul 2010
    Posts
    11
    Rep Power
    0

    Default

    can't anyone help me with this?

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

    Default

    Myself, I wouldn't use GroupLayout but rather a combination of other layouts, say two BoxLayouts, or BoxLayout and BorderLayout.

  4. #4
    Maxideon is offline Member
    Join Date
    Jun 2010
    Posts
    28
    Rep Power
    0

    Default

    Let "Relationen", the text area, "Neu", and "Loschen" be called c1, c2, c3, and c4 respectfully.

    Then what you want is essentially the following.

    Java Code:
    Horiz Group = Sequential Group{c1,c2,Parallel Group{c3,c4}}
    Vertical Group = Parallel Group{c1,c2,Sequential Group{c3,c4}}
    that is,

    Java Code:
    layout.setHorizontalGroup(
            layout.createSequentialGroup()
                .addComponent(c1)
                .addComponent(c2)
                .addGroup(layout.createParallelGroup()
                    .addComponent(c3)
                    .addComponent(c4))
    );
    layout.setVerticalGroup(
            layout.createParallelGroup()
                .addComponent(c1)
                .addComponent(c2)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(c3)
                    .addComponent(c4))
    );

  5. #5
    random7 is offline Member
    Join Date
    Jul 2010
    Posts
    11
    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, 08:41 AM
  2. How to print a HTML/JSP span using javascript?
    By sayan751 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-14-2009, 06:38 AM
  3. How to span column headers over several columns
    By thayalan in forum AWT / Swing
    Replies: 0
    Last Post: 06-02-2009, 04:33 PM
  4. New To The Group
    By javarishi in forum Introductions
    Replies: 5
    Last Post: 04-10-2008, 04:34 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
  •