What's wrong with my applet?

I have an applet here: http://diggswarm.ryeterrell.net

It works fine on my two machines, but apparently people elsewhere cant run it. I was wondering if anyone could click it and check the console to see what the problem is?

Thanks for any help!

Rye

Doesn’t work with the appletviewer.

HTML parsing: incorrect value for width/height attribute
java.lang.NumberFormatException: For input string: “100%”

So… use proper pixel values there.

And other then that… did you compile it with the -source 1.4 -target 1.4 switches? Otherwise it will require your Java version (or better).

It works fine here (nice little demo btw).

The problems elsewhere are probably caused by what oNyx mentioned about the -target switch (although the 100% thing worked just fine here).
Or maybe even a missing java plugin.
If not, ask for java console output. Otherwise we’ll just be guessing.

Yea, 100% works in browsers, but the appletviewer doesn’t have a clue how big 100% is supposed to be. For that it would need a complete html rendering engine. In most cases you wont cope will all kinds of sizes and constant values will do the trick.

Okay, I am using 1.4 source now. Can you guys look at it again?

About the 100% thing… how can I get it to use 100% of the display without using 100%?

Thanks!!

Rye

because you mention “1.4 source”, did you compile with -source 1.4 target 1.4?

the 100% width is really ok - since nobody will use appletviewer to watch it :wink:

Well, I am using netbeans and am not really familiar with the javac command line compiler, but I set the “source” option on the project to 1.4. Does that do the trick?

-source Provide source compatibility with specified release
-target Generate class files for specific VM version

So… target is the one which is responsible for the class version.

Yeah, it’s just that in netbeans, there is no “target” option. I was hoping that it was contained in one option. Anyone familiar with netbeans know?

Anyways, does it work? http://diggswarm.ryeterrell.net

:stuck_out_tongue:

I tried it when you first posted and it was really slow but now it works great ;D

So it works.

Great thanks :slight_smile: