EVALUATION
There are at least 3 problems associated with this bug report
1) browser painting issue
This is Firefox specific issue and can be demonstrated by the RoundTripNonEDT.html
applet. Once the dialog is up, move the dialog on top of the browser and you won't
see applet being repainted.
2) hang issue
This can be demonstrated by the RoundTripModalEDT.html applet with both IE and FF
browsers. There's an easy workaround for the hang issue by performing the actual
displayFrame on an EDT via invokeLater. Workaround as follows:
public void frameDisplay(final String msg) {
try {
SwingUtilities.invokeLater( new Runnable() {
public void run() {
doFrameDisplay(msg);
}
});
}catch(Exception e){
}
}
public void doFrameDisplay(String msg) {
Container frame = this;
while(frame != null && !(frame instanceof Frame))
frame = frame.getParent();
d = new Dialog((Frame)frame,"Java AWT Popup",true);
Container c = d.getParent();
System.out.println(c);
d.setLayout(new GridLayout(2,1));
Panel p1 = new Panel();
Panel p2 = new Panel();
dbutton = new Button("OK");
p2.add(dbutton);
dbutton.addActionListener(new ButtonAction1());
l=new Label(msg);
p1.add(l);
d.add(p1);
d.add(p2);
d.setSize(100,100);
d.pack();
d.setVisible(true);
boolean s = d.isModal();
System.out.println(s);
d.addWindowListener(new WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
d.setVisible(false);
}
});
}
3) applet area painting issue
With the RoundTripModalEDT applet, on clicking on the "callJava2" button.
If you move the second alert box over the applet area, the applet area won't get
repainted. This is expected because when the second alert box is up, java is
waiting for the javascript operation to complete - waiting for the use to dispose
the alert box.
Will address problem #1 in the near term.
|