?
Solved

JTable setSelectedRow?

Posted on 2009-04-08
4
Medium Priority
?
1,313 Views
Last Modified: 2012-05-06
I have a table where I call it's getSelectedRow() to see which row that is selected. I how ever want to be able to set it myself sometimes. How do I do that? There is no setSelectedRow (at least not in 1.4.2 as I am using.
0
Comment
Question by:mdoland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:isarasoo
ID: 24097406
Not sure exactly , but have you tried -- setEditingRow(int aRow)
0
 

Author Comment

by:mdoland
ID: 24097556
No, It don't seem to work
0
 
LVL 1

Accepted Solution

by:
isarasoo earned 2000 total points
ID: 24097699
The following should work setRowSelectionInterval(0, 0)

change (0,0) to whichever row you want
0
 

Author Closing Comment

by:mdoland
ID: 31568040
Awesome!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question