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 6 of 6

Thread: Components fill Frame area

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    5
    My Mood
    Stressed
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Components fill Frame area

    Cross posted: http://www.java-forums.org/awt-swing...rame-area.html
    I have a JFrame with the size 270,400 ,is there a way to make the components added to it change there size to fill the available area within the JFrame??


  2. #2
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: Components fill Frame area

    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  3. The Following User Says Thank You to newbie For This Useful Post:

    questionmark32 (October 9th, 2013)

  4. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    5
    My Mood
    Stressed
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Components fill Frame area

    my program contains border,flow and grid layout, but they only fill the area they require, not the entire area provided

  5. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Components fill Frame area

    Quote Originally Posted by questionmark32 View Post
    my program contains border,flow and grid layout, but they only fill the area they require, not the entire area provided
    And how are they nested? Layouts such as FlowLayout manages the size of child components based upon their preferred size. I recommend providing an SSCCE as demonstration such that the issue can be reproduced and someone can help resolve the problem.

  6. The Following User Says Thank You to copeg For This Useful Post:

    questionmark32 (October 9th, 2013)

  7. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Components fill Frame area

    This thread has been cross posted here:

    http://www.java-forums.org/awt-swing/82698-components-fill-frame-area.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting

    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. The Following 2 Users Say Thank You to KevinWorkman For This Useful Post:

    copeg (October 9th, 2013), questionmark32 (October 9th, 2013)

  9. #6
    Junior Member
    Join Date
    Oct 2013
    Posts
    5
    My Mood
    Stressed
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Components fill Frame area

    Thanks, for adding the link and for the info

Similar Threads

  1. Replies: 5
    Last Post: August 10th, 2013, 03:21 PM
  2. Fill
    By bejoykodiyan in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 9th, 2012, 02:28 AM
  3. Replies: 1
    Last Post: January 19th, 2012, 03:44 PM
  4. Games/Application (Video output, Frame, Graphics Components,Versatility)
    By chronoz13 in forum Java Theory & Questions
    Replies: 3
    Last Post: July 7th, 2011, 08:06 AM
  5. Text fill
    By IBANGS in forum JDBC & Databases
    Replies: 1
    Last Post: May 26th, 2010, 03:42 AM