Name: nt126004 Date: 04/08/2003
FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
My Webstart application has an initial popup (a JDialog) which asks the user for login information, and this JDialog is created before any JFrame.
When launched via Webstart, Webstart's "Desktop Integration" prompt (which asks the user "Would you like to have 'appname' integrated into your desktop environment?" fights for focus with my app's initial JDialog. The Webstart prompt seems to put itself on "top" of my dialog, it is impossible to select any of the Webstart choices because actual focus remains on the JDialog.
Once my app's login dialog has been filled in and is gone, the user can then make a choice on the Webstart "Desktop Integration" prompt.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I have the testcase below available via Webstart at http://www.classgrabber.com/webstart/focus.jnlp
The "real application" (non-testcase app) is available at http://www.classgrabber.com/webstart/agent.jnlp
When Webstart's "Desktop Integration" comes up, select "Ask later" so you can repeat the problem (If you select "Yes" or "No", web start won't prompt anymore).
EXPECTED VERSUS ACTUAL BEHAVIOR :
As in previous versions, Webstart doesn't actually run the application until the user has answered Webstart's prompt "do you want to add this item to your desktop". This avoids focus problems.
Since Webstart now runs the application while the Webstart "Desktop Integration" prompt is still up, there is a "fight for focus" and it is confusing to the user.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
/**
* AVAILABLE AT: http://www.classgrabber.com/webstart/focus.jnlp
* Focus test case for webstart problem.
* PLEASE NOTE that even though this JDialog doesn't have any input fields,
* in my real app, there are input fields, and it is confusing to the
* user where the focus is.
*/
public class FocusProblem {
public static void main(String args[]) {
JFrame frame = new JFrame() {
public Dimension getPreferredSize() {
return new Dimension(200, 100);
}
};
frame.setTitle("Debugging frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(false);
JDialog dialog = new JDialog(frame, true);
dialog.getContentPane().add(new JLabel("foo"));
dialog.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) {
System.exit(0);
}
public void windowClosed(WindowEvent event) {
System.exit(0);
}
});
dialog.pack();
dialog.setVisible(true);
}
}
---------- END SOURCE ----------
Release Regression From : 1.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 183475)
======================================================================
|