• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable and mouse cursor

 
ertan eyimaya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it possible to change mouse cursor according to the column of the cell? For example, if I have a JTable with two column. Only for cells of columnB I want hand cursor. For cells of the columnA mouse cursor should be normal.
Is that possible?
If yes how?

Thanks...
 
Anand Loni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think it is possible to have different cursor for different columns. You have to add mouse listener for table and in mouseEntered method get the point by event and column at that point. When you get column set whichever type of cursor you want to set.

Hope this works...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!