When you run the following program on either Solaris or Digital Unix, the time
it takes for the dialog box to pop up is significantly slower with JDK 117 than
with JDK 116. Just run the program, click on "Modal", and then see how long it takes for the Dialog box to pop up.
With JDK116, the Dialog box pops up instantly. With JDK117, it takes several
seconds.
import java.awt.*;
import java.awt.event.*;
class Main extends Frame {
Frame mainWindow;
Main() {
Button b;
mainWindow = new Frame ("Dialog Example");
b = new Button("Modal");
mainWindow.add("West", b);
b.addActionListener (new MainDialog (mainWindow));
mainWindow.pack();
mainWindow.show();
}
static public void main(String[] args) {
new Main();
}
}
class MainDialog implements ActionListener {
Dialog dialog;
Frame mainWindow;
public MainDialog (Frame mainWindow) {
this.mainWindow = mainWindow;
}
public void actionPerformed (ActionEvent e) {
dialog = new Dialog (mainWindow, true);
dialog.add ("Center", new Button ("Quit"));
dialog.pack ();
dialog.show ();
}
}
it takes for the dialog box to pop up is significantly slower with JDK 117 than
with JDK 116. Just run the program, click on "Modal", and then see how long it takes for the Dialog box to pop up.
With JDK116, the Dialog box pops up instantly. With JDK117, it takes several
seconds.
import java.awt.*;
import java.awt.event.*;
class Main extends Frame {
Frame mainWindow;
Main() {
Button b;
mainWindow = new Frame ("Dialog Example");
b = new Button("Modal");
mainWindow.add("West", b);
b.addActionListener (new MainDialog (mainWindow));
mainWindow.pack();
mainWindow.show();
}
static public void main(String[] args) {
new Main();
}
}
class MainDialog implements ActionListener {
Dialog dialog;
Frame mainWindow;
public MainDialog (Frame mainWindow) {
this.mainWindow = mainWindow;
}
public void actionPerformed (ActionEvent e) {
dialog = new Dialog (mainWindow, true);
dialog.add ("Center", new Button ("Quit"));
dialog.pack ();
dialog.show ();
}
}
- relates to
-
JDK-4167137 JCK-116a interactive AWT tests using the JDK 117 improperly display Frames
- Closed