Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem getting the selected row in jtable  RSS feed

 
randy butler
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All, having a issue with getting the current selected row in my jtable. it returns -1 so its like its not seeing the selected row from the user. here is my code


thanks
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to get non -1 for selected row, the table's row needs to be highlighted. So is your mf.PartToolOrderTable a table? When is the initComponents() method call? If it is for initializing like the name suggest, then your selectedRow() shouldn't be in this method.
 
randy butler
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply I figured it out though. I was calling the wrong constructor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!