get data from JTable

R

Raspberry

Hi all,

I have a JTable retrieve, insert and delete from DB . and I have JList
display data of each column using table.getValueat(row, column)
the problem is I want to select values of column distinctly ( no
repeated data )without using SELECT statement
Is there is anyway to do this without coccnect to database ?

thanks in advance
 
V

voorth

Hi all,

I have a JTable retrieve, insert and delete from DB . and I have JList
display data of each column using table.getValueat(row, column)
the problem is I want to select values of column distinctly ( no
repeated data )without using SELECT statement
Is there is anyway to do this without coccnect to database ?

thanks in advance

Read the column and add the values to a java.util.Set
This will give you all distinct values.

--Henk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top