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

Highlighting multiple rows in JTable  RSS feed

 
Adikya Narayan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to highlight multiple rows of a JTable (contained in a JPanel) whose values i have edited and saved;but its highlighting only the first row i edit and not the other rows.I tried using the addSelectionInterval() as well as setSelectionInterval() but in vain.

Background :

This JPanel's JTables' (say child) data is dependent on the selected row of another JPanel's JTable (say parent).Firstly, i am selecting the row of the associated JTable (parent) and fetching the corresponding JPanel's JTables' (child) data and then selecting the multiple rows which i had previously edited and saved. Everything works fine and while debugging i noticed that its even selecting the rows properly .Please refer the following piece of code :






What could be the problem ?

Please refer the attachment for detailed information of how the form has been built .



Adithya.
 
Campbell Ritchie
Sheriff
Posts: 53773
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please always use the code button for code, and don't write lines too long. Since you are new, I have edited your posting for you, and you can see how much better it looks.
 
Adikya Narayan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for letting me know..I will keep that in mind
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!