This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Row selection return value  RSS feed

 
Seema Sharma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please let me know why the below code returns -1 and throws arrayindexoutofbound exception. This line of code is written in action listener for jcombobox.



Thanks in advance,
Seema
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Seema Sharma:
Hi,
Please let me know why the below code returns -1


What does the API for JTable#getSelectedRow() say about when the method returns -1?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!