I have a root panel (2 rows, 1 column) which has panel P and a label L in it. P has a JComboBox B in it. Whenever I click on B, the resulting dropdown shows-up behind L. How do I fix this? I played around with all sorts of setComponentZOrder() but I could not fix this. What should I do?
Don't mix heavyweight components (e.g. Label) with lightweight components (e.g. JLabel).
If you use Swing always use lightweight components starting with a J.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With