How to run applet in ubuntu or linux



After import statement just add this line in your applet

/*<applet code =”appletwelcome” width=100 height =300></applet>*/


Here is the sample applet source code

//Applet displaying welcome
import java.applet.*;
import java.awt.*;
/*<applet code =”appletwelcome” width=100 height =300></applet>*/

public class appletwelcome extends Applet
{
    public void init()
     {
          setBackground(Color.red);
      }

public void paint(Graphics g)
{
     String msg=”welcome”;
     g.drawString(msg,10,10);
}
}

Leave a Comment

Your email address will not be published. Required fields are marked *

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat