Java: Make one item of a jcombobox unselectable(like for a sub-caption) and edit font of that item
How to make one item in a combobox unselectable because I need to separate items in a combobox with a sub-topic . And is it possible to modify the font of that particular item individually? jComboBox_btech_course.setFont(new java.awt.Font("Tahoma", 0, 14)); jComboBox_btech_course.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select Course" })); jComboBox_btech_course.setName(""); private class theHandler implements ActionListener { public void actionPerformed(ActionEvent evt) { //BTech courses if(jComboBox_mtech_dept.getSelectedItem().equals("Civil Engineering")) { jComboBox