Step 1: Create a java source file with name MyAction.java that is name of java class and it is mandatory that classname and filename must be same.
Applet class must be public.
Step 2: Run cmd(command prompt) and compile java source file, MyAction.class file'll be build.Then give appletviewer command and applet will pop out.
Output:
Applet class must be public.
Output:
More Applet Topics :
- Applet lifecycle
- Basic Applet Program
- Applet using html
- How to handle image with Applets
- How to Move a Banner with Applet class and Runnable Interface
- Explore Applet by creating textbox,checkbox,list,radio button
- Component class methods mouseEnter,mouseExit and action used with applet
- Event handling using applet class and ActionListener interface
- Event handling using applet class and FocusListener interface
- Login using applet class and ActionListener interface
- Simple calculator using Java Applet and Event Handling
No comments:
Post a Comment