Search code examples
javaswingjcombobox

move jCombobox button to the left


I have a jCombobox and i want to move the button used to display the choices to the left. Any idea of how to do this?

---------------------------
|\/ |Combobox             |
--------------------------

thanks


Solution

  • You could call this on the JComboBox:

    jComboBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    

    That should set the button to the left side. It will not, however, change the alignment of the elements in the drop-down-list.