-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.6
When the following test case is run under 1.2beta4 (builds A and B), the
optiondialog dismisses immediately after it is brought up. This does not
happen under 1.1.7 (before build A - on 4/20/98). This bug occurs only on
Solaris - not win32.
I am running on an Ultra-1 using Solaris 2.6.
Also, the frame is sized incorrectly - the setSize(int, int) call has
no effect, and the frame appears at the minimum size. The frame sizes
correctly when the optiondialog code is removed from the test case.
Test case
---------
/*
* CheckColor.java
*/
import java.awt.*;
import java.awt.event.*;
public class CheckColor {
OptionDlg option;
public static void main(String args[]) {
new CheckColor();
}
public CheckColor() {
Frame f = new Frame("Check Color");
// Note: setting the Frame Size has no effect when we use
// the optiondialog stuff. If we comment out the two lines
// w/ optiondialog stuff, the frame comes up the right size.
option = new OptionDlg(f);
f.setSize(400, 200);
f.pack();
f.setVisible(true);
System.out.println("Check - set frame visible");
option.setVisible(true);
System.out.println("Check - set option visible");
}
}
class OptionDlg extends Dialog {
TextField tf1;
TextField tf2;
public OptionDlg(Frame f) {
super(f);
System.out.println("Option - did super");
setLayout(new GridLayout(2, 1));
System.out.println("Option - did grid");
tf1 = new TextField("1000", 5);
tf2 = new TextField(5);
System.out.println("Option - did tfs");
add(tf1);
add(tf2);
System.out.println("Option - did adds");
pack();
System.out.println("Option - did pack");
}
}
optiondialog dismisses immediately after it is brought up. This does not
happen under 1.1.7 (before build A - on 4/20/98). This bug occurs only on
Solaris - not win32.
I am running on an Ultra-1 using Solaris 2.6.
Also, the frame is sized incorrectly - the setSize(int, int) call has
no effect, and the frame appears at the minimum size. The frame sizes
correctly when the optiondialog code is removed from the test case.
Test case
---------
/*
* CheckColor.java
*/
import java.awt.*;
import java.awt.event.*;
public class CheckColor {
OptionDlg option;
public static void main(String args[]) {
new CheckColor();
}
public CheckColor() {
Frame f = new Frame("Check Color");
// Note: setting the Frame Size has no effect when we use
// the optiondialog stuff. If we comment out the two lines
// w/ optiondialog stuff, the frame comes up the right size.
option = new OptionDlg(f);
f.setSize(400, 200);
f.pack();
f.setVisible(true);
System.out.println("Check - set frame visible");
option.setVisible(true);
System.out.println("Check - set option visible");
}
}
class OptionDlg extends Dialog {
TextField tf1;
TextField tf2;
public OptionDlg(Frame f) {
super(f);
System.out.println("Option - did super");
setLayout(new GridLayout(2, 1));
System.out.println("Option - did grid");
tf1 = new TextField("1000", 5);
tf2 = new TextField(5);
System.out.println("Option - did tfs");
add(tf1);
add(tf2);
System.out.println("Option - did adds");
pack();
System.out.println("Option - did pack");
}
}