how to catch the mouse event when the table cell is just in the edit state?

C

cl

Hi,everybody

as the title, it's the problem i faced, when the cell is in the edit
state, then the mouse event i binded to this cell(as pop-up a dialog)
can't work, I don't what's the matter, otherwise, if I should change
the state from edit to render, and how to do?

regards,
pooricahrd
 
Z

zero

Hi,everybody

as the title, it's the problem i faced, when the cell is in the edit
state, then the mouse event i binded to this cell(as pop-up a dialog)
can't work, I don't what's the matter, otherwise, if I should change
the state from edit to render, and how to do?

regards,
pooricahrd

Sounds like you need to add the same mouse listener to the editor. I
assume you're not using a custom editor?

Try something like this:

Component editorComp = table.getEditorComponent();
editorComp.addMouseListener(myMouseListener);
 
C

cl

Actually, the cell is a JButton, when pressed first, shows a
JInternalFrame, closed the InternalFrame, and press the Button again,
then no InternalFrame showed . So i think may the button is in Editor.
I will try your said.

thanks,
poorichard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top