This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Panel on Splitpane: Fully occupy the Pane

 
Karen Baog
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need some help with the placement of this component.
What I need is to place this panel to fully fit in the JFrame.
Also, when the JFrame is resized this panel will also resize, so does the JList.
This panel is added to a spiltpane, but it only appears in the center and not fully occupy the allocated pane.

Here�s the snippet of the relevant code.

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The panel is probably laying out fine. It's the JList that might be visually confusing as to what the component is doing. Try setting a layout of BorderLayout on the JPanel (P) and adding the scroller to it with BorderLayout.CENTER.
 
Karen Baog
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. I'l try that out. But how about this JPanel to still fully occupy its pane in the splitpane when the JFrame is resized?
 
Karen Baog
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And in addition to the resizing problem how do I get the JList to wrap the text?

Thanks to all you guys for your help.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic