Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JList resizes  RSS feed

 
huguette santos
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I got a JList in a BorderLayout in WEST region.
Initially it is empty, but when it is populated the width of the list is adjusted to the largest item displayed.
- in CENTER region, the list is not resized.
- I could set the width with setFixedCellWidth(), but I don't know the initial width given to the list by the layout manager.
How to force a JList to keep its initial width when placed in WEST or EAST region ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!