I have doubts about Jcombobox ... for example, I have a gui that contains a jcombo field and a button ... In the Jcombo field, I added a string array object, for example, color 1, color 2, color 3: String [] colors = {"Color 1", "Color 2", "Color 3"}, and I can select the color by clicking on the button using colorchooser, and it will only apply to the button. But I want to set the color before the color "Color 1", "Color 2" in the combo box. for example: if I chose a color as a red through button, for jcombobox only the color symbol "Only the selected item" should be applied (for example, color 1 should be displayed as RED, others should be the default colors!
... I am new to Java ... if anyone knows, plz help me .. Thanks
source
share