Monday, 23 May 2011

applet program using java

JAVA CODE: 
import java.applet.Applet; // Includes standard Applet classes
import java.awt.*; // Standard Graphics Routines 

public class Wow extends Applet {
  // Applets use paint instead of main
  public void paint (Graphics page) {
    page.drawString("Wow, this is an Applet!", 5, 10);
  } // method paint
} // class Wow
HTML CODE:
<HTML>
<HEAD>
<TITLE>The Wow Applet!</TITLE>
<BODY>
<APPLET CODE="Wow.class" WIDTH="150" HEIGHT="50">
</APPLET>
<HR>
Was that easy or what?
</BODY>
</HTML>
Post a Comment