GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Disabling mouse-click over JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Disabling mouse-click over JTable" Watch "Disabling mouse-click over JTable" New topic
Author

Disabling mouse-click over JTable

Ashish Chopra
Ranch Hand

Joined: Nov 30, 2004
Posts: 134
HI

I am developing an application that requires mouse-click to be disabled on a JTable. Can anyone tell me how to do this?
I am using the defaultTable Model for the JTable..

TIA


Quis Custodiet Ipsos Custodes<br /> <br />My blog: <a href="http://www.coherentrambling.blogspot.com" target="_blank" rel="nofollow">http://www.coherentrambling.blogspot.com</a>
jefff willis
Ranch Hand

Joined: Sep 29, 2004
Posts: 113
Two ideas come to mind...

1. actually disable the table (and scrollpane if you have one)



2. enable mouse events but do nothing with them

Lionel Badiou
Ranch Hand

Joined: Jan 06, 2005
Posts: 140
Hi Ashish,

I'm not quite sure of what you mean exactly by 'disabling click'... Yet, you may try to use a dedicated table model :


I hope that could be useful,


Lionel Badiou
CodeFutures Software
 
GeeCON Prague 2014
 
subject: Disabling mouse-click over JTable