-
Bug
-
Resolution: Fixed
-
P4
-
1.0
-
1.0beta
-
sparc
-
solaris_2.4
-
Not verified
In the following test case, instead of pushing the button, just
resize the frame slightly, and notice that the components are
laid out nearer to the top of the frame.
////////////////////////////////////////////////////////////////////////////
//
// @(#)ChoiceSize.java 1.2 26 Oct 1995 14:53:04
//
// Copyright 26 Oct 1995 Sun Microsystems, Inc. All Rights Reserved
//
////////////////////////////////////////////////////////////////////////////
package test;
import java.awt.*;
public class ChoiceSize extends Frame {
public static void main(String[] args) {
ChoiceSize w = new ChoiceSize();
w.init();
}
private Panel panel;
private Button b;
private Choice choice;
public void init() {
setLayout(new FlowLayout());
choice = new Choice();
choice.addItem("Eat");
choice.addItem("Sleep");
add(choice);
b = new Button("Push Me");
add(b);
resize(300, 100);
show();
}
public boolean action(Event e, Object o) {
if (e.target==b) {
choice.addItem("Kowabunga, dudes!");
return true;
} else {
return false;
}
}
}
resize the frame slightly, and notice that the components are
laid out nearer to the top of the frame.
////////////////////////////////////////////////////////////////////////////
//
// @(#)ChoiceSize.java 1.2 26 Oct 1995 14:53:04
//
// Copyright 26 Oct 1995 Sun Microsystems, Inc. All Rights Reserved
//
////////////////////////////////////////////////////////////////////////////
package test;
import java.awt.*;
public class ChoiceSize extends Frame {
public static void main(String[] args) {
ChoiceSize w = new ChoiceSize();
w.init();
}
private Panel panel;
private Button b;
private Choice choice;
public void init() {
setLayout(new FlowLayout());
choice = new Choice();
choice.addItem("Eat");
choice.addItem("Sleep");
add(choice);
b = new Button("Push Me");
add(b);
resize(300, 100);
show();
}
public boolean action(Event e, Object o) {
if (e.target==b) {
choice.addItem("Kowabunga, dudes!");
return true;
} else {
return false;
}
}
}