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 Need Suggestions please! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need Suggestions please!" Watch "Need Suggestions please!" New topic

Need Suggestions please!

Vani Prabakaran

Joined: Jun 08, 2000
Posts: 13
In my project I need to create a tabbed properties panel (like the one in VB). I am using JInternalFrame with JTabbedPane. I have added JTable inside the tab and it looks fine. The problem is, I need to format each cell in one column differently (one as a text field, another as combo etc) and it seems impossible as the cell renderer works columnwise (I may be wrong!).
Can anyone suggest any component apart from JTable for the properties window?
or is there a way to format the JTable cells in one coulmn differently.
Any help would be appreciated.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

If you're using the JTable to assist you with laying things out, then use a GridLayout instead, and specify that it has the same rows and columns as your JTable.

Here is a very rough take:
[This message has been edited by Mike Curwen (edited April 03, 2001).]
Meghna ks
Ranch Hand

Joined: Mar 15, 2001
Posts: 122
Yes, Mike's suggestion is correct. I was trying to do a similar thing, but since I too faced the same difficulty, I'm using Label-TextField pairs setting Grid Layout for the usual Data Types such as strings, Integers, date etc. and When I need to bring a combobox or a checkbox, I create it exclusively in place of the Textfield. Hope this helps. Please let me know if I'm not clear on this.
I agree. Here's the link:
subject: Need Suggestions please!
It's not a secret anymore!