Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

addSelectionInterval() Problem  RSS feed

 
Phil Harron
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a table of information and one of the actions I've added is to insert a blank row into the table and leave the blank row highlighted. The trouble is the table selection always highlights two rows - the one I initially selected and the empty row. The ListSelectionModel is set to SINGLE_SELECTION
Any help would be very much appreciated..
Thanks
Phil
 
Kathy Rogers
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the setSelectionInterval(index,index) method instead of addSelectionInterval.
Hope this solves the problem,
Kathy
 
Phil Harron
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kathy - thanks for your reply, I've tried that but the result remains the same?
I shall keep trying!
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!