File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JTable look and feel. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable look and feel." Watch "JTable look and feel." New topic

JTable look and feel.

Naveen Kumar
Ranch Hand

Joined: Dec 14, 2006
Posts: 35
Please send me any body having examples on JTable Look and Feel.

Russell Peters
Ranch Hand

Joined: Jan 25, 2006
Posts: 50
you gotta post some of your work, before asking someone for help. This place is to try and learn things. You have to be more specific in what you want.

I don't think anybody would be willing to simply send you stuff, without knowing that you tried something and were stuck in it, be it examples or code. :roll:

And if you are still gonna be that generic, all I can say is GIYBF, Sorry!

Good Luck !
[ February 01, 2007: Message edited by: Russell Peters ]

SCJP 1.4
Naveen Kumar
Ranch Hand

Joined: Dec 14, 2006
Posts: 35
Please see the below link

In this look and feel i have to do.

So any body can help me.
Henrik Engert
Ranch Hand

Joined: Apr 26, 2005
Posts: 70

The first thing you have to do is to write a class that extends AbstractTableModel.

Then depending on what needs to be shown in the table you might be able to use the standard TableCellRenderers that come with JTable. For example to show an image in a Cell you can use ImageIcon as the type and then you would want to override the following method from AbstractTableModel:

Then the getValueAt needs to return an ImageIcon.

This is not something that is easy to do your first time, but once you have done a TableModel it will become easier.

You also have to write this stuff on your own or else you won't learn a thingy.

I agree. Here's the link:
subject: JTable look and feel.
jQuery in Action, 3rd edition