Results 1 to 3 of 3
  1. #1
    jasonw749 is offline Member
    Join Date
    Mar 2012
    Posts
    9
    Rep Power
    0

    Default JPanel widths/heights

    hi,

    so i have a set of panels, 4 around the edges, and one in the centre. i would like, if possible, for the centre panel to maintain its aspect ratio, yet grow along with the window.

    I came up with a couple of ways to attempt this, but they all broke for one reason or another. Thanks for the help!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is online now Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,965
    Rep Power
    8

    Default Re: JPanel widths/heights

    How did you attempt to solve the problem? What broke when you made the attempt?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    jasonw749 is offline Member
    Join Date
    Mar 2012
    Posts
    9
    Rep Power
    0

    Default Re: JPanel widths/heights

    Quote Originally Posted by KevinWorkman View Post
    How did you attempt to solve the problem? What broke when you made the attempt?
    I tried using BorderLayout and setting the preffered size of the outer panels, but of course that kept the sizes after resizing (i want the outer panels to grow in proportion to the window)

Similar Threads

  1. Replies: 0
    Last Post: 02-17-2013, 09:21 PM
  2. Change JPanel text of Parent JPanel from JDialog
    By bikashlama in forum AWT / Swing
    Replies: 7
    Last Post: 12-09-2011, 03:47 AM
  3. PDFBox Font encoding and bad widths
    By javment in forum Advanced Java
    Replies: 0
    Last Post: 03-15-2011, 11:17 AM
  4. Placing a new JPanel over a paint overriden JPanel
    By Tanshaydar in forum AWT / Swing
    Replies: 4
    Last Post: 12-08-2010, 06:00 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
  •