This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Disabling mouse-click over JTable" Watch "Disabling mouse-click over JTable" New topic

Disabling mouse-click over JTable

Ashish Chopra
Ranch Hand

Joined: Nov 30, 2004
Posts: 134

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..


Quis Custodiet Ipsos Custodes<br /> <br />My blog: <a href="" target="_blank" rel="nofollow"></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
subject: Disabling mouse-click over JTable
Similar Threads
JTable and popup
jtable help
The Header Of JTable
Capture Mouse Events on JTable