apparently there is no way to do what i want to do. the default selection of the JComboBox in my custom tab is black. i would like it so when you choose my tab the preview changes to black. i tried this
public void updateChooser()
{
//getColorSelectionModel().setSelectedColor(colors[selector.getSelectedIndex()]);
}
and this
public void buildChooser()
{
selector.setEditable(false);
selector.setSelectedIndex(0); // Default selection is black
selector.addActionListener(this);
add(selector);
getColorSelectionModel().setSelectedColor(colors[selector.getSelectedIndex()]);
}
the first one disabled all the other tabs. the second didnt do much(not what i wanted anyway). i noticed the other tabs dont change the preview to their defaults(if they have them) either. i guess that is just the way it is. if the user wants to choose Black from my custom tab they will have to drop down the list and choose it even though it is the default