How to set border for combo box? Follow
ComboBox cmbList = new ComboBox();
As you can see the combo boxes has no borders in dracula theme. I set the border explicitly for the combo box but blue color hover effect that provided by intelliJ IDE isn't working. How to set border that supports intelliJ hovereffect as well?
Please sign in to leave a comment.
We do no recommend changing the default appearance of builtin Swing controls. Why do you need to change it?
IntelliJ[2020.1] Combobox has built in border style but with our implementation the border is not visible for darcula theme. Actually we are trying to mimic this same appearance to our combo box.
Why don't you use standard implementation?
Desired behavior is provided by com.intellij.ide.ui.laf.darcula.ui.DarculaComboBoxUI, not just border.
I already tried with this darcula UI but the result is same. The combobox not contains the border even after set darcula combobox UI
The same implementation is working with 2017 intellIJ IDE. 2019 intelliJ and the upper versions not support the border.
IntelliJ Idea version 2017 combobox
You shouldn't set UI by your own as it works automatically by design. When you change theme custom border would be reset together with whole component UI. Border customization is not recommended for comboboxes but still you can do a trick:
Thank you for your support and guidance. I fixed this combo box UI issue as you said.