Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Resizing JList  RSS feed

Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JList which resides in a JScrollPane. In the list are various codes, the user can begin to type and narrow the list. As the list narrows I would like the list to resize. This was all working fine until I moved to 1.4, now it acts like it is one refresh behind. For example first I have 20 visible rows, that gets narrowed to 10, but the list still shows 20 (10 are empty), then we narrow it to 5, and the list shows 10 (5 are empty), etc.
Here is my resizing code, any help would be appreciated.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!