-
Bug
-
Resolution: Unresolved
-
P3
-
None
-
solaris
-
generic
-
solaris_nevada
[dep, 02May2007]
I've noticed that on recent builds, regardless of window manager
settings to the contrary, swing applications take input focus
immediately on startup. This is really annoying behavior, especially
if I'm in the middle of typing something sensitive in the window that
looses focus.
Setting AWT_TOOLKIT=MToolkit makes the problem go away. (At least on
SPARC; on x86 I get font errors which ultimately result in an NPE).
A simple test program which exhibits the problem:
import javax.swing.*;
public class Test implements Runnable
{
public static void main(String args[])
{
SwingUtilities.invokeLater(new Test());
}
public synchronized void run()
{
assert (SwingUtilities.isEventDispatchThread());
JFrame frame = new JFrame("Test");
frame.add(new JLabel("Hello World"));
frame.pack();
frame.setVisible(true);
}
}
I've noticed that on recent builds, regardless of window manager
settings to the contrary, swing applications take input focus
immediately on startup. This is really annoying behavior, especially
if I'm in the middle of typing something sensitive in the window that
looses focus.
Setting AWT_TOOLKIT=MToolkit makes the problem go away. (At least on
SPARC; on x86 I get font errors which ultimately result in an NPE).
A simple test program which exhibits the problem:
import javax.swing.*;
public class Test implements Runnable
{
public static void main(String args[])
{
SwingUtilities.invokeLater(new Test());
}
public synchronized void run()
{
assert (SwingUtilities.isEventDispatchThread());
JFrame frame = new JFrame("Test");
frame.add(new JLabel("Hello World"));
frame.pack();
frame.setVisible(true);
}
}
- relates to
-
JDK-6187066 Want to open a Frame without activating it
- Closed