wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JTable manipulations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable manipulations" Watch "JTable manipulations" New topic
Author

JTable manipulations

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
Hello all,

I want to know how can I enable sorting by clicking on the header of a JTable column.

I want to change the color of a Row in the table depending on the value of a column .

can any body help me in doing these 2 things.

thanks a lot.

regards
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
Anybody can help me hereeeeeeeeee ? I am really sorry, I suck at GUIs...

thanks in advance.

regards,
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> how can I enable sorting by clicking on the header of a JTable column.

use TableSorter

http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting


> change the color of a Row in the table depending on the value of a column.

use a custom renderer
(if unsure, search for row color, row highlight etc. - numerous examples here, sun, google)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable manipulations
 
Similar Threads
JTable
JTable
JTable
JTable
JTable