> > Also, calling pack() on a dialog seems to be have a race condition.
> > It doesn't always get the insets() right. I noticed that if you
> > write the following you get reasonable semantics:
> >
> > hide();
> > pack();
> > sleep(100);
> > pack();
>
> This *should* be fixed, but I'd love a test case if you have it. I
> rewrote the way Insets are handled to track the Frame's state, and have
> a routine that verifies the Frame's state (including its Insets) whenever
> a native method is called (if you enable an AWT debugging property). As
> you well know, we have a lousy test suite, so I'm soliciting any and all
> for samples demonstrating 1.0.2 problems to make sure they are fixed.
Ok. I've written a simple example that works on Solaris but gets the
dialog size completely wrong on the PC. Here it is:
import java.io.*;
import java.awt.*;
class Test {
public static void main(String argv[]) {
// Create a base frame
Frame frm = new Frame("hello");
frm.reshape(100, 100, 100, 100);
frm.show();
// Create the dialog
Dialog t = new Dialog(frm, true);
t.add("Center", new Label("This the center"));
t.add("South", new Button("ok"));
t.pack();
t.show();
System.out.println("done");
}
}
> > It doesn't always get the insets() right. I noticed that if you
> > write the following you get reasonable semantics:
> >
> > hide();
> > pack();
> > sleep(100);
> > pack();
>
> This *should* be fixed, but I'd love a test case if you have it. I
> rewrote the way Insets are handled to track the Frame's state, and have
> a routine that verifies the Frame's state (including its Insets) whenever
> a native method is called (if you enable an AWT debugging property). As
> you well know, we have a lousy test suite, so I'm soliciting any and all
> for samples demonstrating 1.0.2 problems to make sure they are fixed.
Ok. I've written a simple example that works on Solaris but gets the
dialog size completely wrong on the PC. Here it is:
import java.io.*;
import java.awt.*;
class Test {
public static void main(String argv[]) {
// Create a base frame
Frame frm = new Frame("hello");
frm.reshape(100, 100, 100, 100);
frm.show();
// Create the dialog
Dialog t = new Dialog(frm, true);
t.add("Center", new Label("This the center"));
t.add("South", new Button("ok"));
t.pack();
t.show();
System.out.println("done");
}
}