Re: Repost: JTable - selected row in large table is not "visible"



On Tue, 18 Oct 2005 13:26:25 +0200, Branko Kaucic
<branko.kaucic@xxxxxxxx> wrote or quoted :

> grid.getSelectionModel().setSelectionInterval(i,i)

You just want to make sure those selected rows are as visible as
possible, which might be impossible if the user has selected more than
a screenful.

You might want to simulate how the user would do it, first making the
first row visible then the last.

Keep in mind that your JTable lives in a JScrollPane. Perhaps someone
will come up with a better, way, but you could use
JScrollPane.getVerticalScrollBar().setValue().


--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.



Relevant Pages

  • [Offtopic] What would you like to change in C# and .NET?
    ... isSelected in big DataGrids is very time-consuming. ... a property with some kind of list of currently selected rows. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Show Rows Button
    ... I have created a calendar of activities and want to create both a ... collapsed/summary view (containing just some selected rows) and an expanded ... I've searched in help and only found "filters", but I want to filter based ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • cx_Oracle, is anything selected?
    ... I want to optimize the situation when the number of selected rows is zero. ... Is select countthe only option, seems inefficient? ... Prev by Date: ...
    (comp.lang.python)
  • Re: to sqlplus expert. - is this sqlplus version problem?
    ... rownum ONLY applies to SELECTed rows ... Prev by Date: ...
    (comp.databases.oracle.server)