• Post Reply Bookmark Topic Watch Topic
  • New Topic

about TableModelListener

 
mohamed abdo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have jcombobox in jtable when state changed i submit avalue in another column in the table ,and i made TableModelListener on the table when the value changed in that column i make some processing on that value , the problem is in when state changed of the combo and set the value TableModelListener not work and didnt feel any change

pease help me to find solution
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need to add an ItemListener to the combo box. The JTable will automatically update the TableModel when you select a value from the combo box.

I have no idea what you might be doing wrong. Read the JTable API and follow the link to the Swing tutorial on "How to Use Tables" for a working example of a table using a combo box. Then just add your TableModelListener to the code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!