Skip to main content

Error when drawing Swing components on Safari 4

1 reply [Last post]
emallin
Offline
Joined: 2007-08-29
Points: 0

Hi,
Since the release of Safari 4, I've had problems on MAC OSX with our Swing application, which includes an embedded JDIC browser. I've been following the thread http://forums.java.net/jive/thread.jspa?threadID=61639&tstart=15 and have attempted to implement some of the changes described in that Thread. Although this has resolved some of the problems, any attempts to update the GUI, e.g. display a Swing dialog on top of the browser Window, result in the application hanging

I've noted that the fix in the previous thread did follow the guidelines in technical note TN2147 (http://developer.apple.com/mac/library/technotes/tn2005/tn2147.html#TNTAG25), so I was wondering if anyone else has come across this issue. Unfortunately I've no experience with Objective-C.

It can be very quickly demonstrated by adding a JOptionPane to the jdic Browser demo application, e.g. when the STOP button is pressed. When the application attempts to draw the Pane over the browser, the application hangs.

Browser.java

void jStopButton_actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(this,
"Stop pressed", "Warning",
JOptionPane.WARNING_MESSAGE);
webBrowser.stop();
}

Many thanks,
Eoin

Message was edited by: emallin

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
emallin
Offline
Joined: 2007-08-29
Points: 0

Hi all,
this was resolved by setting
-Dcom.apple.eawt.CocoaComponent.CompatibilityMode=false

Eoin