Hi,
I found a bug in the class javax.swing.TimerQueue.
The bug occurs in openjdk-6-src-b17-14_oct_2009 on Linux.
The bug occurs a when using a javax.swing.JMenu inside another JMenu, the inner
menu doesn't popup correctly.
The reason is that the Timer is not running.
I changed the file "javax/swing/TimerQueue.java" and moved the statement
"running = true;"
in front of the Thread.start() method call.
synchronized void start() {
if (running) {
throw new RuntimeException("Can't start a TimerQueue " +
"that is already running");
}
else {
final ThreadGroup threadGroup =
AppContext.getAppContext().getThreadGroup();
running = true;
java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction() {
public Object run() {
Thread timerThread = new Thread(threadGroup,
TimerQueue.this,
"TimerQueue");
timerThread.setDaemon(true);
timerThread.setPriority(Thread.NORM_PRIORITY);
timerThread.start();
return null;
}
});
}
}
Best regards
Stefan
________________________________
HOB RD VPN - einfach, sicher und flexibel auf alle Unternehmensanwendungen und
-daten zugreifen
Praesentation unter: http://www.hob.de/rdvpn2/
HOB GmbH & Co. KG
Schwadermuehlstr. 3
D-90556 Cadolzburg
Geschaeftsfuehrung: Klaus Brandstaetter, Zoran Adamovic
AG Fuerth, HRA 5180
Steuer-Nr. 218/163/00107
USt-ID-Nr. DE 132747002
Komplementaerin HOB electronic Beteiligungs GmbH
AG Fuerth, HRB 3416