Board index » jbuilder » How to select multiple rows at JdbTable?

How to select multiple rows at JdbTable?


2004-05-18 01:40:06 PM
jbuilder1
Hello all,
Is it possible to select multiple rows in JdbTable by pressing Ctrl/Shift
keys and selecting desired rows. Windows users would expect this feature.
I have searched this forum and Google as well, but did not find the answer
to my question.
Many thanks at advance,
Vlad
 
 

Re:How to select multiple rows at JdbTable?

XXXX@XXXXX.COM wrote:
Quote
Hello all,

Is it possible to select multiple rows in JdbTable by pressing Ctrl/Shift
keys and selecting desired rows. Windows users would expect this feature.

I have searched this forum and Google as well, but did not find the answer
to my question.

Many thanks at advance,

Vlad
Look at the ListSelectionModel.
java.sun.com/j2se/1.4.2/docs/api/javax/swing/ListSelectionModel.html
In relation to a JdbTable or JTable, look at something like the following:
ListSelectionModel selectionModel =
table.getSelectionModel();
selectionModel.setSelectionInterval(start, end);
In additon, you might want to look through this tutorial.Excellent
infomation on JTables.
www.softlab.is.tsukuba.ac.jp/~liuxj/private/books/JFC_Unleased/ch12.htm
 

Re:How to select multiple rows at JdbTable?

Paul,
Thank you very much, that is what i needed:
ListSelectionModel selectionModel =
jdbResult.getSelectionModel();
selectionModel.setSelectionMode(selectionModel.MULTIPLE_INTERVAL_SELECTION )
;
Have a great holidays,
Vlad
"pnichols" < XXXX@XXXXX.COM >wrote in message
Quote
XXXX@XXXXX.COM wrote:

>Hello all,
>
>Is it possible to select multiple rows in JdbTable by pressing
Ctrl/Shift
>keys and selecting desired rows. Windows users would expect this
feature.
>
>I have searched this forum and Google as well, but did not find the
answer
>to my question.
>
>Many thanks at advance,
>
>Vlad

Look at the ListSelectionModel.


java.sun.com/j2se/1.4.2/docs/api/javax/swing/ListSelectionModel.html

In relation to a JdbTable or JTable, look at something like the following:

ListSelectionModel selectionModel =
table.getSelectionModel();
selectionModel.setSelectionInterval(start, end);


In additon, you might want to look through this tutorial.Excellent
infomation on JTables.



www.softlab.is.tsukuba.ac.jp/~liuxj/private/books/JFC_Unleased/ch12.htm

 

{smallsort}