• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Highlighting multiple rows in JTable

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 74341
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for letting me know..I will keep that in mind
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic