1

I use JTattoo LookAndFeel for my swing application. JComboBoxes in my app do not paint correctly. They do not show the selected item text. It just shows an arrow at the middle of JComboBox. When I click on combo, it shows the dropdown list, but it does not show the selected item. How can I fix that?

EDIT: It works in other lookAndFeels. My GUI objects are constructed and manipulated in the event dispatch thread. but the comboboxes are corrupted.

enter image description here

Dariush Jafari
  • 5,223
  • 7
  • 42
  • 71
  • 1
    Does it work in other look and feels? – MadProgrammer Jun 18 '15 at 03:40
  • 1
    Verify that your application is [correctly synchronized](http://docs.oracle.com/javase/tutorial/uiswing/concurrency/initial.html), for [example](http://stackoverflow.com/a/30841894/230513), and does _not_ artificially constrain the layout, for [example](http://stackoverflow.com/a/12532237/230513). – trashgod Jun 18 '15 at 03:53
  • 1
    Possible duplicate of [Why doesn't my JFrame repaint when I set a new Synthetica theme?](http://stackoverflow.com/questions/30841389/why-doesnt-my-jframe-repaint-when-i-set-a-new-synthetica-theme) – Catalina Island Jun 18 '15 at 10:12

1 Answers1

1

I realized that I had changed the lookAndFeel after mainframe.setVisible(). I should had changed id before mainFrame.setVisible() to take the best effect.

Dariush Jafari
  • 5,223
  • 7
  • 42
  • 71