• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Row Selection in JTable

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic