• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSplitPane/JScrollPane/JList alignment

 
Gary Down
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Gary Down
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Craig,
I had advanced to using a cell renderer
as


Your way is much smarter and neater.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic