Solved

JTable setSelectedRow?

Posted on 2009-04-08
4
1,303 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

728 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