It is a bug, and it seems to be related to the setResizable() (if
you comment that out, it appears as normal).
And lo, the chronicles report that Dustin Lang spake thusly unto the masses:
>
>
> Hi,
>
> Before I submit this to jitterbug, I'd like to make sure I'm not just on
> crack.
>
> This used to work before I upgraded (to JDK1.1.7, XFree86 3.3.3.1, and
> kernel 2.2.0, from JDK1.1.6, XFree86 3.3.2(?), kernel 2.0.36. Window
> manager = fvwm2). It also works correctly on win32. I don't have access
> to a Solaris machine to check if it happens there.
>
> What happens, at least for me, is the Frame shows up on screen at the
> right size, but the body of it is all gray. If I drag it to a nearby
> location, it is drawn correctly. Also, if I uncomment the last line, it
> is drawn correctly.
>
> I'm not sure, but I believe it should be drawn correctly without the
> explicit setLocation?
>
> Thanks (and sorry for wasting your time if I am in fact on crack),
> dstn.
>
> ---
>
> import java.awt.*;
> import java.awt.event.*;
>
> public class FrameTest extends Frame {
>
> public static void main(String[] args) {
> new FrameTest("Test", "This is a test");
> }
>
> public FrameTest(String title, String text) {
> super(title);
> add("Center", new Label(text, Label.CENTER));
> Button okay = new Button("Okay");
> add("South", okay);
> setBackground(Color.white);
> okay.addActionListener(new ActionListener(){
> public void actionPerformed(ActionEvent e) {
>
> ((Frame)((Component)e.getSource()).getParent()).dispose();
> System.exit(0);
> }
> });
> pack();
> setResizable(false);
> show();
> // This will make it be drawn correctly.
> //setLocation(10,10);
> }
> }
>
>
> ---------------------------------
> Dustin Lang, [EMAIL PROTECTED]
>
--
¤--------------------------------------------------------------------¤
| Aaron Gaudio mailto:[EMAIL PROTECTED] |
| http://www.rit.edu/~adg1653/ |
¤--------------------------------------------------------------------¤
| "The fool finds ignorance all around him. |
| The wise man finds ignorance within." |
¤--------------------------------------------------------------------¤
Use of any of my email addresses is subject to the terms found at
http://www.rit.edu/~adg1653/email.shtml. By using any of my addresses, you
agree to be bound by the terms therein.