Hello, I am currently developing applets (Java 1.4.1_01) using Mac OS X, and am testing them using MS IE for Macintosh, and Safari (Apples wed browser). The applets appear to work OK using MS IE, but there are some problems when the applet is run using Safari -- Mainly, my applet contains a JScrollPane that contains a JTextArea (where multiple lines of text will be displayed). Using Safari, the initially posted text appears ok, but, then, if you try and scroll, the text gets all garbled. My gut instinct is that the JTextArea simply isn't getting updated (since if I select the text in the text area, then it goes from garbled to appearing correctly (i.e you can read it)) -- I've tried to find out how to tell the applet to repaint when the scroll bar is used -- but I think Java takes care of that. So, I guess my question is, has anyone experienced similar problems, and what did they do about it? Thanks for your help in advance, Adam
Joined: Sep 19, 2003
Well, After doing a little bit more research I happened to come across the following link: http://cs.wellesley.edu/~cs111/computing_at_home/ For your convience, I have pasted the texted that helped me below (and also just in case the above link goes down/gets changed, etc): "Topic: Using Safari to run Java applets Safari has a similar problem to the one we faced earlier... it has a plug-in called Cocoa which uses Java version 1.4.1 which may be buggy. Safari also has plug-ins for Java 1.3.1. So lets disable the plug-in for Java 1.4.1 so our Java applets will run smoothly.
Open up a "Terminal" window (From the "Go" menu at the top of the screen, select "Applications". In the window that opens, there should be a folder "Utilities". Open the "Utilities" folder and double-click on the "Terminal" icon.)
Type "sudo mv /Library/Internet\ Plug-Ins/JavaPluginCocoa.bundle /Documents" If you want to verify that you are now successfully using only 1.3.1 Java plug-ins with Safari, you can do the following. Open up Safari. Now go to the "Help" menu at the top of the screen and select "Installed Plug-Ins". You should NOT see the lines "Java Plug-in for Cocoa" and "Java 1.4.1 Plug-in (sun.plugin.appletviewer) - from file JavaPluginCocoa.bundle". If you see these lines then you did not successfully remove the plug-in. If these lines are absent, then you are good to go! " This page also has a couple of other tips for writing code on a Macintosh, so you might just want to check it out...