This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python 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: 3620
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!