permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes JSplitPane/JScrollPane/JList alignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JSplitPane/JScrollPane/JList alignment" Watch "JSplitPane/JScrollPane/JList alignment" New topic
Author

JSplitPane/JScrollPane/JList alignment

Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
How do I make the items (all String items) in my JList display in the centre of the panel?

The Jlist is held in a JScrollPane inside a JSplitPane.

Please don't just tell me to read the doco again as I have read it over a few times but still don't understand it. Pointing me to something specific might be of use though.

Thanks,
Gary.



Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Gary Down
Ranch Hand

Joined: Apr 09, 2004
Posts: 46
Thanks Craig,
I had advanced to using a cell renderer
as


Your way is much smarter and neater.
 
wood burning stoves
 
subject: JSplitPane/JScrollPane/JList alignment
 
Similar Threads
Panel on Splitpane: Fully occupy the Pane
JScrollpane problem
SetVisibleRowCount ignored
JList (Scrollable?)
GridBagLayout resize issue