I want combo box in jtable visible from start not when i click the cell... any idea?
Majestics
84
Posting Pro
Recommended Answers
Jump to PostLet's java.awt.Robot do it.
Jump to Post@Majestic please check my post http://stackoverflow.com/questions/6261017/how-to-add-different-jcombobox-items-in-a-column-of-a-jtable-in-swing/6261853#6261853 and then really ask the question, sure there are lots of ways how to implements that, anyway basic tutorial show this issue in low lever form
Jump to PostTry using this for your cell renderer. You can pass it the combo box that you are using for the cell editor.
class CheckBoxCellRenderer implements TableCellRenderer { JComboBox combo; public CheckBoxCellRenderer(JComboBox comboBox) { this.combo = new JComboBox(); for (int i=0; i<comboBox.getItemCount(); i++){ combo.addItem(comboBox.getItemAt(i)); } } public Component …
All 10 Replies
quuba
81
Posting Pro
Majestics
84
Posting Pro
mKorbel
274
Veteran Poster
Majestics
84
Posting Pro
mKorbel
274
Veteran Poster
Majestics
84
Posting Pro
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Majestics
84
Posting Pro
Majestics
84
Posting Pro
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.