LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   JTables (https://www.linuxquestions.org/questions/programming-9/jtables-715847/)

manolakis 03-31-2009 01:03 PM

JTables
 
Hi,

It is actually my first time that I deal with JTables and I would like to ask some help. I have a JTable which when the user clicks on a row I want to be highlighted. Secondly I would like to ask you about writing mouse event listeners/handlers for JTables. I want to know how is it possible to write a double click handler. Finally, I would like to know how is it possible on a right click on a row a list of options to be appeared.
I would be really pleased if anyone suggest any tutorial or give a snippet.

Thank you.

paulsm4 04-02-2009 12:01 AM

Hi -

As far as JTables, please look at the tutorial I mentioned in my post to your other question:

http://java.sun.com/docs/books/tutor...elistener.html

As far as <right-click> and <double-click> ... I don't know how easy or difficult that might be. This reference might help:

http://java.sun.com/docs/books/tutor...elistener.html

Suggestion: maybe it would be better to focus on the JTable itself first, and wait until version 2.0 before you start adding features like <right-click>.

'Hope that helps .. PSM


All times are GMT -5. The time now is 06:16 AM.