wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Detecting changes in JTable cells Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Detecting changes in JTable cells" Watch "Detecting changes in JTable cells" New topic
Author

Detecting changes in JTable cells

Pradeep Kadambar
Ranch Hand

Joined: Oct 18, 2004
Posts: 148
Hi

I am new to JTable. Here I have a Jtable with one of the columns having a editable JComboBox. How can I detect the entry made by the user.

Also a popup menu is availed to select a label. If selected the 1st column must show a icon. How can I detect this activity and set the corresponding icon.

jefff willis
Ranch Hand

Joined: Sep 29, 2004
Posts: 113
Your class should extend TableModelListener and override the tableChanged() method.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Detecting changes in JTable cells