User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
Hi Guys!
I'm new to this list but I won't waste time, here are my issues:
We have an application that the boss wants converted to an applet so
demo's of it can be put on the web. It's been a long time since I've
done any applets, and the work I've done in the past with them is
minimal. So far I've gotten it to work OK, BUT I had to get rid of a
methods used in our primary data class from the application that were
accessing a properties file, put the data from the properties files into
the HTML page holding the applet with PARAMS tag, and then read them out
of that. It works fine, but I would like to do this without adding a lot
of code just for the applet's and instead stick with the properties file.
I was hoping that I could jar up the properties file (along with
others), reference the archive in the HTML page, and then read them, but
I get a security exception. I know I can change this by setting up the
security policy manager and appropriately written file so it would allow
the applet to read them, but this would mean (I think) that the users
trying to run the demo, which should be a simple process, would then
need to alter or create a security policy file on their machines, which
I think would be too much to ask just for a demo.
Is there an easier way of doing this? Actually, putting the PARAMS in
the HTML page isn't that big a deal, but I would rather use a Properties
class or some variant of it to extract the data from the HTML page and
do it in a manner that doesn't add tons of code just for the applet.
Does such a thing exist?
My second issue is a question about the SwingUtilities class methods
invokeAndWait() and invokeLater(). The application receives data RAPIDLY
from devices like oscilloscopes, converts it to a format that's scaled
to the screen coordinates we're using, and then issues a repaint()
command. This is on a JPanel, by the way. In any case, the data we
receive and convert can be done much more quickly than the JVM can draw
it, and after tracing the activities out, we found that some of the
frames of data were being skipped. What we did to correct this is
synchronize a portion of the run() method that's running this thread and
then, after repaint() is issued, we call wait(). A block of the code in
the paintComponent() method is synchronized, and when complete, it calls
notify(). This appears to work great (REALLY great, in fact). When
researching this problem, I reviewed both invokeAndWait() and
invokeLater() and Sun's write up's indicate that it's possible you don't
really need to use them. We have discovered one and only one problem
with this, and it's on Netscape 7 running under OS X. If the mouse is
moved over some of Netscape's link options (like "search", "home"
etc...they're on the third bar down) the applet will lock. This occurs
ONLY on Netscape 7 on OS X. It works fine with Safari, Explorer, and
Firefox on OS X, and fine on all browsers we've tested on other
platforms such as Windows and Linux. Is this a bug in Netscape 7 on OS
X, or should I be looking at the SwingUtilities method's I've just
mentioned (in other words, am I missing something?)
By the way we're using Java 1.4.2_7 on Tiger, and the latest JVMs
available for Jaguar and Panther (I don't remember the exact release
numbers)
Thanks in advance,
Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden