how to create an applet

Answer Posted / akansha

Here is the java code of program :

import java.applet.*;
import java.awt.*;

public class FirstApplet extends Applet{
public void paint(Graphics g){
g.drawString("Welcome in Java Applet.",40,20);
}
}


Here is the HTML code of the program:

<HTML>
<HEAD>
</HEAD>
<BODY>
<APPLET ALIGN="CENTER" CODE="FirstApplet.class" WIDTH="800"
HEIGHT="500"></APPLET>
</BODY>
</HTML>

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null keyword in java?

527


Convert Binary tree to linked list.

591


Name component subclasses that support painting in java programming?

639


What is linkedlist in java?

510


what is a working thread? : Java thread

555






What do you mean by aggregation?

570


What is method and methodology?

608


Can you call a method on a null object?

563


What is substring 1 in java?

591


What is the difference between a constructor and a method?

568


What is lambda programming?

498


What are the topics in core java?

531


Detail discussions on JVM, memory management and garbage collector.

555


What is extension method in java?

562


Write a program in java to establish a connection between client and server?

505