-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.3.0
-
generic
-
solaris_2.6
Swing apps that uses JFrame no longer display its contents until the frame
is resized. The following program should demonstrate the problem. It worked
in jdk1.2 and other release before that.
Roger Pham 12/8/99
=============================================================================
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Jlist {
public static void main(String argv[]) {
Jlist jm = new Jlist();
}
Jlist () {
JFrame jf = new JFrame("JFrame");
Container contentPane = jf.getContentPane();
contentPane.setLayout(new FlowLayout());
String []s = {"Choice 1",
"Choice_2",
"Will I pick the same thing in the future?",
};
contentPane.add(new JList(s));
JButton jb = new JButton("Quit");
contentPane.add(jb);
jb.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
System.exit(0);
}
});
jf.setVisible(true);
jf.setSize(250, 125);
}
}
is resized. The following program should demonstrate the problem. It worked
in jdk1.2 and other release before that.
Roger Pham 12/8/99
=============================================================================
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Jlist {
public static void main(String argv[]) {
Jlist jm = new Jlist();
}
Jlist () {
JFrame jf = new JFrame("JFrame");
Container contentPane = jf.getContentPane();
contentPane.setLayout(new FlowLayout());
String []s = {"Choice 1",
"Choice_2",
"Will I pick the same thing in the future?",
};
contentPane.add(new JList(s));
JButton jb = new JButton("Quit");
contentPane.add(jb);
jb.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
System.exit(0);
}
});
jf.setVisible(true);
jf.setSize(250, 125);
}
}