I can't seem to control the size of the applet when it appears in the appletviewer and i assume that will be how it looks on the web.

Right now, on the web, my applet is too big:
http://blogfriendlyzone.webs.com/WheelOfFortune/WheelOfFortune.html

When i run it as application, it obeys setSize to make it smaller or setExtended to fit the screen.

But regardless changing setSize to be smaller, the applet is still too big to show the whole game in appletviewer. It ignores setSize or setExtended.

I haven't been able to compile yet with toolkit(). It won't recognize that line.
Dimension d = Toolkit.getDefaultToolKit().getScreenSize();
But it keeps saying it cannot find symbol method getDefaultToolKit() and already import java.awt.* java.awt.Toolkit; java.lang.Object;

But i don't even know if that would control the size. As it is, the applicaiton is normal but the applet is not.

Recommended Answers

All 2 Replies

Member Avatar for Dukane

Applet size on the web is controlled by the width and height attributes in the embed/object tag in your HTML page.

You need to take a closer look at that line. There is a very subtle mistake in there, that is very easy to make, and seems VERY natural to type... (I do it all the time >.< )

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.