Search code examples
javaswingjcomboboxrsyntaxtextarea

Combo box items are hidden behind other controls.


error screenshot:

https://i.sstatic.net/3keuR.png

The JComboBox items are obscured by RSyntaxTextArea in programs created with Java Swing.

This symptom does not occur when running the same program on a mac. It only occurs in the windows environment.

Could someone give me some hint about the solution?


Solution

  • Try using:

    comboBox.setLightWeightPopupEnabled(false);
    

    See Mixing Lightweight and Heavyweight Components for why this should work.