I use a combo box on panel and as I know we can add items with the text only
comboBox.addItem(\'item text\');
But some times I need to
You can use String arrays to add jComboBox items
String [] items = { "First item", "Second item", "Third item", "Fourth item" }; JComboBox comboOne = new JComboBox (items);