Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

event handling in jtable

 
Rajesh em
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
i am new to this ,
how to handle events if more than one combo box used in jtable
e.g..
if u click on the first combo get the selected name or combo according to that the values should be added on the next combo..

pl.reply soon
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a ListSelectionListener to the table SelectionModel and to the TableColumnModel SelectionModel of each TableColumn. Find the selected cell(row,col) in the valueChanged method and determine what you want to do with the selected value based on the (row,col) position.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic