Solved

JTable ?

Posted on 2002-04-27
1
243 Views
Last Modified: 2010-03-31
Hi,
I have a JTable inside a JScrollPane. My JTable has hundres of rows.
Could annyone show me the code that let a specified row of JTable
appear in the viewport of the JScrollPane (that row is seen by user)
without scrolling the JScrollPane to find out the correct row (if I have
the index of the row )
Thankx,
Bye.
0
Comment
Question by:kianh
1 Comment
 
LVL 16

Accepted Solution

by:
heyhey_ earned 50 total points
ID: 6973452
try something like

table.scrollRectToVisible(table.getCellRect(row, 0, true));
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Understanding websocket example in spring 1 56
PDFBox - convert image to PDF, PDF resolution 3 117
eclipse compiler vs Installed JREs option 3 75
servlet doXXX methods 3 35
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now