I am borrowing some code I found on the web that shows how to create a combobox with an embedded JTree. I am having an issue because I would like to use the Nimbus LAF but currently the code only has a custom class to handle the Metal, Windows and Motif LAFs. Is there any way to add code to do this for the Nimbus LAF?
I did some searching on the web but I keep coming back with results showing how to change the colors and fonts for Nimbus.
Here is the method overriding the updateUI() of the JComboBox
And here is the custom LAF classes to return a custom PopUp
Here is a link to the actual site with the source code: JTreeComboBox
Actually, I just made a step forward. While snooping around in the API I found that Nimbus uses SynthComboBoxUI which extends BasicComboBoxUI. That being said, I added
Now it actually shows the full tree in the drop down (Before it was only showing one line, it wasn't adjusting the combobox size to the size of the JPopup) but my JTreeComboBox looks like a JLabel. Somehow my popup messed up that portion of the display, I'm not sure what element that is. I'll keep working on it.