• 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

How to disable the table list - JTable

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I used JTable for displaying the list of items. My application will perform some action when the user clicks on any one of the items in the list.

I need to disable the table list when the user clicks on one of the buttons available in the GUI. There shouldn't be any mouse click events on the table list after I press the button and also no action should be taken.

How can I do that??

I used JTable.setEnable(false). Its not working.
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sahitya sahitya:
I used JTable for displaying the list of items. My application will perform some action when the user clicks on any one of the items in the list.

I need to disable the table list when the user clicks on one of the buttons available in the GUI. There shouldn't be any mouse click events on the table list after I press the button and also no action should be taken.

How can I do that??

I used JTable.setEnable(false). Its not working.


How about using a boolean class that the Table's mouselistener uses to determine if the mouse click will do anything.

Something like so:
 
sahitya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks...the problem is solved
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Sahiyta Sahitya" please confirm that is your real name; it does not appear to conform with our naming policy.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Campbell Ritchie:
"Sahiyta Sahitya" please confirm that is your real name; it does not appear to conform with our naming policy.



Indeed!
It translates to "literature literature" or "stuff stuff"
 
reply
    Bookmark Topic Watch Topic
  • New Topic