Java - How can we determine the width and height of my applet?

How can we determine the width and height of my applet?

- Applet tags have attributes width and height with which we can determine their dimensions.
- When applet is running inside a web browser the size of an applet is set by the height and width attributes and cannot be changed by the applet.
- The 'getSize()' method is retrieved the size of an applet.
- The 'getSize()' method is inherits from 'java.awt.Component.getSize()' and returns a 'java.awt.Dimension object.
Java - Explain how to set the background color within the applet area
How to set the background color within the applet area - You can set the background color of an applet in the following manner:..
Java - What are methods that controls an applet’s life cycle, i.e. init, start, stop and destroy?
Methods that controls an applet’s life cycle - Life Cycle of an Applet: Basically, there are four methods in the Applet class on which any applet is built...
Java - What are the methods that control an applet’s on-screen appearance? I.e. update and paint
Methods that control an applet’s on-screen appearance - The paint() method is called in situations the applet window being overwritten by another window or uncovered or the applet window being resized...
Post your comment