Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Row Selection in JTable

 
Suhas Mohamedali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to prevent selecting another row of JTable if the ' mainAction ' is equal to Actions.CHILDCHANGED OR Actions.MODIFIED
I am able to show the Error Dialog while selecting another row but once the dialog is closed it is selecting the pointed row.
I want to select the edited row once the error dialogue is closed.

Please help.



 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no ideas from code posted here, for better help sooner post an SSCCE, short, runnable, compilable, just about a.m. issues
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also can't help with a way based on the posted code, but a global way might be
to use an AWTEventListener (mouse event mask) to do:
1) get the component clicked on
2) if the table, and if(mainAction == Actions.CHILDCHANGED || mainAction == Actions.MODIFIED),
consume the event
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic