Solved

JTable ?

Posted on 2002-04-27
1
245 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

777 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