Hello, I am developed an application finally, i have to show the result into a form of spread sheet, i used JTable(in this i used component like Check box and combo box) but i stuck here if i want to add JList into JTable. I want to show the result in this form using JTable can any one please help me out ..
ID NO Vendor Group Users 1 abc 1 a b 3 e g h
2 xyz 2 b c d
3 def 3 a
what i would like i want to add Jlist for column name Group and User. Can anyone please give me some good suggestion. Or any thing that maintain that state of showing data without using Jlist...
If I understand correctly, a JComboBox might be a better bet for this data. Either way, you will want to use a custom CellEditor. There is a nice section on this in the Java Tutorial under the heading "Using a Combo Box as an Editor":
What IDE do you use for developing JTable codes? Although my general purpose IDE is Eclipse, I use NetBeans for Swing components development.
-- Ashik Atlanta, USA
Joined: Apr 21, 2005
Well even if you don't want to use a combo box, you still need to create your own CellEditor because you will be using a JList to edit the values of the cells (instead of one of the standard editors). You might also need to create your own CellRenderer...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com