This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JComboBoxes in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JComboBoxes in JTable" Watch "JComboBoxes in JTable" New topic
Author

JComboBoxes in JTable

Nicholas Rogers
Greenhorn

Joined: Feb 21, 2003
Posts: 2
Hello,
I have a JTable with 5 columns: Cols 2-5 are dynamic comboboxes, each dependent on the
previously selected item. The code below works beautifully when there is only one row, but when
I add another row, all comboboxes empty when the user tries to select a value. Can someone please help me figure this out?
My code:

[ February 21, 2003: Message edited by: Nicholas Rogers ]
[ February 21, 2003: Message edited by: Nicholas Rogers ]
[ February 21, 2003: Message edited by: Nicholas Rogers ]
[ February 21, 2003: Message edited by: Nicholas Rogers ]
[ February 21, 2003: Message edited by: Nicholas Rogers ]
[ February 21, 2003: Message edited by: Nicholas Rogers ]
Nicholas Rogers
Greenhorn

Joined: Feb 21, 2003
Posts: 2
I've limited this to the combobox renderer. If I comment out the lines that set the renderer to the column, adding new rows works, but I'd like the renderer to be a combobox instead of the standard textfield. Any help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JComboBoxes in JTable
 
Similar Threads
Swing JCombobox and JTable issue
Regarding JComboBox in a JTable
JCheckBox in JTable Rendering problem
MultiComponent JTable
Problem in adding/deleting rows from Jtable