When the Java language was introduced, the language feature that got the most attention was applets, Java programs that run on web pages. You can run them in any web browser that handles Java programs and test them with appletviewer, a tool included in the JDK that’s supported in NetBeans.
The structure of applets differs from applications. Unlike applications, applets do not have a
main() block. Instead, they have several sections that are handled depending on what is happening in the applet. Two sections are the
init() block statement and the
init() is short for initialization, and it is used to take care of anything that needs to be set up as an applet first runs. The
paint() block is used to display anything ...