Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I use up all white space around a JPanel?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the BorderLayout.
When I add components to JPanels and
then add themto the JDialogs/JFrames
There are heaps of unused spaces.
I want to use them up, making
the JPanels/JComponents as tall and as wide as possible.
How do I achieve that?
Thanks
Jack
 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JFrame's pack()?
 
Randall Twede
Ranch Hand
Posts: 4585
6
Java Python Scala
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
consider using pack()

I want to use them up, making
the JPanels/JComponents as tall and as wide as possible.


if that is really what you want, look at some of the other layouts(grid layout in particular)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!