aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Urgent: JTable cell listening to mouseClicked??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Urgent: JTable cell listening to mouseClicked???" Watch "Urgent: JTable cell listening to mouseClicked???" New topic
Author

Urgent: JTable cell listening to mouseClicked???

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Hi.
I've a JTable with individual cell selection enabled.
I would like selected cells to listen to mouse clicked events. WHen a user clicks on a cell, a new JFrame pops up.
With my current code, *all* cells are listening to the mouseClicked event. This is wrong. Ideally I would like to use something like this, but I can't get and test colIndex and rowIndex values properly:

I haven't been able to get some clear, concrete answers, I would really appreciate how to do this properly with code samples if at all possible.
Here is my code snippet from a much bigger program, sorry for the size of it.

Please lend a hand if you can.
TIA :-)


humanum errare est.
achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Thanks, works fine now.
I was close.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Urgent: JTable cell listening to mouseClicked???
 
Similar Threads
Passing parameters applet to applet
Calling a method added to tablemodel
REWARD : pass a2a parameter, involves using getCodeBase()
Change the color of a JTable cell on mouse click
JTable Columns