How to get Applet size

I have an applet loaded into an HTML page like this:

<HTML>

<HEAD>

</HEAD>

<BODY BGCOLOR="000000">

<CENTER>

<APPLET

code="TextEditor.class"

width="100%"

height="100%"

>

</APPLET>

</CENTER>

</BODY>

</HTML>

How can I get the length and width of the applet for the java program since it could vary with window size?

Message was edited by:

jkhoa

[614 byte] By [jkhoaa] at [2007-10-3 5:39:20]
# 1
Have you tried getSize()?Recall that applets are GUI widgets and are part of the GUI widget class hierarchies (and so inherit methods like getSize()).
paulcwa at 2007-7-14 23:47:01 > top of Java-index,Java Essentials,New To Java...
# 2
I believe there are getWidth() and getHeight() methods in the Applet class.
CaptainMorgan08a at 2007-7-14 23:47:02 > top of Java-index,Java Essentials,New To Java...