Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Helloworld.java
Language: JAVA
Code:
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.applet.Applet;
import java.awt.Graphics;
/*<applet code="HelloWorld .class" height="300" width="300"></applet>*/
public class HelloWorld extends Applet 
                implements MouseListener 
{

   StringBuffer buffer;
    public void paint(Graphics g)
     {
        g.drawRect(0, 0, 
             getWidth() - 1,
             getHeight() - 1);
        g.drawString(buffer.toString(), 5, 15);
    }
}
Comments: