Is it possible to hide the arrow displayed in the JComboBox
I tried setting:
combo.getComponent(0).setSize(new Dimension(1,1));
But it doesnt seem to work
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to create a new combobox UI for that:
But be careful to inherited from the base UI which matches your current look and feel.
For example if you are using Substance you should derive your new UI from
SubstanceComboBoxUIinstead ofBasicComboBoxUI. Otherwise you’ll might loose features provided by your current L&F.EDIT: If you want this to get some kind of auto-completion feature it’s better to stick with a normal
JTextFieldand useAutoCompleteDecoratorfrom SwingX.