Mac Java Journal

Week Five

3/17/96 This week I'm looking at yet another tutorial that Gamelan pointed me to. It is called Slurp. Nicely, if a bit flowerly, written (not tightly crafted prose like this journal) it promises to make no more than one-line leaps in showing what a Java applet can do. Sounds like just the sort of baby steps I need.

Vijay Mukhi (this tutorial page is in India) lives up to his promise right off the bat by presenting me with a one line java applet which doesn't do anything but does compile properly (hooboy!) Vijay points out that an applet can have a different name from the .class file it creates as long as it has the .java extension. That is true with the Macintosh also with the caveat that the last five characters in the name must be .java. "Helloworld.java" works, and "1 HelloWorld.java" works, but "HelloWorld.java 1" does not work. A 68k Mac without a FPU may not be able to show fonts and colors in the AppletViewer. Also, I realized that the default background color for applets is the same as the grey of the browsers. So if you want your applet images to show up on a transparent background you have to match the two.

Alex Rosen said that the AppletViewer honors the resize() function, but that Netscape doesn't. That means you have to set the size of the applet field with Netscape.

BTW, I discovered that you can't drag text clippings to the compiler. A text clipping that you put down to create a file does not work with the compiler either.

Now back to Vijay. All the applets in the first two sections of his tutorial work as advertised in the AppletViewer. There is one typo on the Tweak of Lemon page. A missing bracket } in the last program listing:

 public void paint(Graphics g)
               {       g.drawLine(a, b, d, e);
               
               public boolean mouseUp(Event evt, int x, int y) 
        

Should have a close bracket after the g.drawline line

More Vijay manana.

3/18/86 Steve Graff reports, " just wanted to let you know of my success running Java applets on my PowerMac 9500/132 running 7.5.3 - this is both using Netscape 2.0 Java beta 1 and the Applet Viewer included with the JDK" Jimm Freedman's 7500/100 with 7.5.3 handles Java applets well also. Thanks Steve and Jimm

If you want to put an alternate image instead of text for users without Java-enabled browsers, make sure the image is tagged within the applet code, but before the Java animation is actually drawn or you'll end up with just the image even on the Java-capable browsers.

I created a page Tom Robbins Applet Land specifically for experimenting with Java page enhancements. It is a subpage of The Infinite Goof website about novelist Tom Robbins. All, I have on there at the moment is a variation on Nervous Text and Alex Rosen's JavaWarp that allows the user to distort a picture onscreen. It's a great applet. I'll be adding a lot to that page.

3/19/96
TidBITS posted this item: Netscape's beta release of a Java-enabled version of Navigator for Power Macs also expired last week, prompting Netscape to re-post the release with the expiration date set to 01-Jul-96. No other changes are included in the release. [GD]
Available here.

I hope this doesn't mean a long delay in releasing a 68k version of the Java-enabled browser.

Luke Cassady-Dorion, a member of the Philadelphia Java Users' Group tells me that his 6100/66 DOS and his PB 5300/c have trouble with Netscape's MacJava. He also mentions that the AppletViewer and Roaster both work fine. Thanks, Luke.

Back to MacJava