🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8933

JTable's setRowSelectionInterval()

#8933
From: Nothing to do with Microshaft.
Date: Sat, 01 Jul 2000 00:00
16 lines
1054 bytes
I have a JTable in a JScrollPane with a vertical scrollbar and single
row selection mode.

JTable's
public void setRowSelectionInterval(int index0,
                                    int index1)

is being used to control which single row is selected.   Works fine if
the selected row is in the viewport, but it does not cause the newly
selected row to shift the table within the viewport to remain visible.

What's the easiest way to get the JScrollPane to always show the
selected row?

Thanks.
Technical Details
Message-ID: <395E41BF.B9427386@hotmail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,5783662b4813b412,start
X-Google-Attributes: gid111d45,public
From: "Nothing to do with Microshaft." <spamless@hotmail.com>
Subject: JTable's setRowSelectionInterval()
Date: 2000/07/01
Message-ID: <395E41BF.B9427386@hotmail.com>
X-Deja-AN: 641281783
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 1 Jul 2000 12:00:52 -0800, 198.68.205.54
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing