Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Problem with GridLayout arrangement.

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with GridLayout 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
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,372
    Thanks
    184
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: Problem with GridLayout arrangement.

    Define GridLayout sizes...do you mean the grid cell width/height? Use GridBagLayout and adjust the width/height of the GridBagConstraints...or use different layouts within nested JPanels

Similar Threads

  1. [SOLVED] JPanel GridLayout isn't working
    By mzamboen in forum What's Wrong With My Code?
    Replies: 4
    Last Post: January 14th, 2012, 02:10 PM
  2. GridLayout help
    By sambar89 in forum AWT / Java Swing
    Replies: 1
    Last Post: November 26th, 2011, 11:00 PM
  3. Images in GridLayout
    By BuhRock in forum AWT / Java Swing
    Replies: 4
    Last Post: November 5th, 2011, 01:15 AM
  4. [SOLVED] how to get the row and column of a component gridlayout
    By prettynew in forum AWT / Java Swing
    Replies: 0
    Last Post: March 13th, 2011, 07:39 PM
  5. [SOLVED] "GridLayout" problem in Java program
    By antitru5t in forum AWT / Java Swing
    Replies: 3
    Last Post: April 16th, 2009, 11:26 AM