import java.applet.*;
import java.awt.*;
public class Demo1 extends Applet
{
public void init()
{
//Code to run automatically
this.setSize(500, 500);
this.setBackground(Color.CYAN);
}
public void paint(Graphics g)
{
//now draw graphics
g.drawLine(0, 0, 100, 100);
g.drawRect(0, 0, 100, 100);
//change color of graphics
g.setColor(Color.blue);
g.drawString("Applet Demo", 0, 120);
}
}
By Gurpreet Singh, Department of Computer Science & Engineering, Amritsar College of Engineering & Technology
Showing posts with label Java Programming. Show all posts
Showing posts with label Java Programming. Show all posts
Tuesday, 4 August 2015
Applet Demo 1
Monday, 3 August 2015
Getting Started with Java GUI Programming
Download the Netbeans IDE from filehippo.com/download_netbeans
Also download Java JDK(32-bit or 64-bit) according to your operating system. For 32-bit operating system download the 32-bit version of Java JDK and for 64-bit operating system download the 64-bit version of Java JDK
After downloading firstly install Java JDK and then Netbeans
Subscribe to:
Posts (Atom)