Results 1 to 9 of 9
  1. #1
    orushw is offline Member
    Join Date
    May 2011
    Posts
    8
    Rep Power
    0

    Default Problem with panel arrangement

    Hi,
    I have a frame with 2 panels.
    1 panel contain 9 buttons on half size of the frame.
    At the second panel i want to create a button named clear.
    When i add the clear button the frame split the panels for 2 equals parts.
    I want the first panel will be bigger than the second panel (cleear button).
    I arranged the frame arrangement with "GridLayout" of 3 lines and 3 columns.
    How can i play with the GridLayout sizes?
    Thanks,
    Or.

  2. #2
    Join Date
    May 2012
    Posts
    18
    Rep Power
    0

    Default Re: Problem with panel arrangement

    I'd say GridBagLayout is a better fit for your requirements.

  3. #3
    orushw is offline Member
    Join Date
    May 2011
    Posts
    8
    Rep Power
    0

    Default Re: Problem with panel arrangement

    Thank you for your answer.
    My all code already use "GridLayout".
    Is there an easy way to do it without change the GridLayout? :)
    Thanks,
    Or.

  4. #4
    Join Date
    May 2012
    Posts
    18
    Rep Power
    0

    Default Re: Problem with panel arrangement

    GridLayout != GridBagLayout. Which are you actually using?

  5. #5
    orushw is offline Member
    Join Date
    May 2011
    Posts
    8
    Rep Power
    0

    Default Re: Problem with panel arrangement

    I'm using GridLayout, not GridBagLayout.

  6. #6
    Join Date
    May 2012
    Posts
    18
    Rep Power
    0

    Default Re: Problem with panel arrangement

    Ok. Was afraid I misunderstood you. :) No idea then, as I wouldn't use this layout for what you're trying to do.

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Problem with panel arrangement

    Quote Originally Posted by orushw View Post
    How can i play with the GridLayout sizes?
    You can't. Choose another layout manager that does allow what you need, or use nested containers each with an appropriate layout.

    Have you gone through the layouts section of the Oracle Java tutorials?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #8
    orushw is offline Member
    Join Date
    May 2011
    Posts
    8
    Rep Power
    0

    Default Re: Problem with panel arrangement

    I will do it.
    Thanks alot!

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Problem with panel arrangement

    Moved from New to Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Lexicographical arrangement
    By Kartiky14 in forum New To Java
    Replies: 2
    Last Post: 03-26-2012, 09:52 AM
  2. components arrangement
    By sudhakar reddy in forum Java Applets
    Replies: 2
    Last Post: 06-03-2010, 03:58 PM
  3. Arrangement of tabs in JTabbedPane
    By swapnilnawale in forum AWT / Swing
    Replies: 0
    Last Post: 03-20-2009, 07:27 PM
  4. arrangement of components
    By masa in forum AWT / Swing
    Replies: 7
    Last Post: 12-12-2008, 10:17 AM
  5. <tr><td> arrangement in a method
    By am17mu in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 05-16-2008, 05:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •