Solved

JTable ?

Posted on 2002-04-27
1
241 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

746 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

10 Experts available now in Live!

Get 1:1 Help Now