Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling mouse-click over JTable

 
Ashish Chopra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
jefff willis
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic