-
Enhancement
-
Resolution: Fixed
-
P4
-
6, 6u10
-
b14
-
x86, sparc
-
linux, solaris, solaris_7, solaris_10
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2173817 | 6u18 | Vikram Aroskar | P4 | Resolved | Fixed | b02 |
JDK-2184215 | 6u17-rev | Vikram Aroskar | P2 | Resolved | Fixed | b05 |
JDK-2182768 | 6u16-rev | Vikram Aroskar | P2 | Closed | Fixed | b04 |
With JRE 1.6.0 on Sparc Solaris 10 and the default awt.toolkit (sun.awt.X11.XToolkit),
it takes several seconds for a modal dialog (javax.swing.JDialog) to appear. The
application appears frozen during this pause.
Switching to the old motif toolkit restores the expected behavior of no pause before
modal dialogs appear.
JUSTIFICATION :
By default on JRE 1.6.0 sparc solaris, there is a several second freeze any time a modal
dialog (including JFileChooser) is opened.
JRE 1.5.0 did not exhibit this freeze behavior with either sun.awt.X11.XToolkit or
sun.awt.motif.MToolkit.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
There should be no noticable pause when opening a modal dialog.
ACTUAL -
The application freezes for several seconds before the modal dialog appears.
---------- BEGIN SOURCE ----------
class TestAModalDialog extends javax.swing.JDialog
implements java.awt.event.ActionListener {
public TestAModalDialog(java.awt.Frame parent) {
super(parent, true);
javax.swing.JButton b = new javax.swing.JButton("Dismiss");
getContentPane().add(b);
b.addActionListener(this);
pack();
setLocation(parent.getLocation());
}
public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
dispose();
}
}
class TestA extends javax.swing.JFrame
implements java.awt.event.ActionListener {
public TestA() {
javax.swing.JButton b = new javax.swing.JButton("Press Me");
getContentPane().add(b);
b.addActionListener(this);
pack();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
System.exit(0);
}
});
setLocation(new java.awt.Point(x,y));
x+=100; y+=50;
}
public void actionPerformed(java.awt.event.ActionEvent e) {
new TestAModalDialog(this).setVisible(true);
}
static int x = 0;
static int y = 0;
public static void main(String[] argv) {
// put up three JFrames
new TestA().setVisible(true);
new TestA().setVisible(true);
new TestA().setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
switch to the motif toolkit by setting -Dawt.toolkit=sun.awt.motif.MToolkit when running java 1.6.0 on sparc solaris.
- backported by
-
JDK-2184215 Modal dialogs open slowly with JRE 1.6.0 sun.awt.X11.XToolkit
- Resolved
-
JDK-2173817 Modal dialogs open slowly with JRE 1.6.0 sun.awt.X11.XToolkit
- Resolved
-
JDK-2182768 Modal dialogs open slowly with JRE 1.6.0 sun.awt.X11.XToolkit
- Closed
- duplicates
-
JDK-6589536 Application modal dialog displayed over many windows in Linux is very slow
- Closed
-
JDK-6751484 Displaying a JDialog after a second Frame is shown is slow
- Closed
-
JDK-6607166 Swing Becomes Very Sluggish When Attempting to displayDialog with setModal(true)
- Closed
- relates to
-
JDK-6547881 NPE when closing modal dialog
- Closed
-
JDK-6878168 PIT: Showing Print/Page dialog throws CCE
- Closed
-
JDK-6863016 setVisible(false) of modal dialog in applet(next-gen plugin) takes too long
- Closed