Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swing component and jdk version issue

I have a combo box. After selecting an item in combo box new JDialog opens.

  1. When i use JDK 1.6_06, I am able to click on buttons in JDialog properly.
  2. When i use JDK 1.6_24, then i need to click anywhere in JDialog first. Then only clicking on button works. Firstly i thought this is some issue with the focus. But component works fine with JDK 1.6_06. But its a issue only with JDK 1.6_24.

I tried to google it. But didnt find any answer. Does anybody have any idea?

like image 419
user613114 Avatar asked Apr 15 '11 09:04

user613114


1 Answers

I don't know about the java versions - but putting dialog.setVisible(true) in SwingUtilities#invokeLater solved this issue some time back for me. YMMV.

like image 69
Dakshinamurthy Karra Avatar answered Oct 14 '22 08:10

Dakshinamurthy Karra