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);
}
}

Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation