hascet
Fully Optimized
- Messages
- 3,218
How would you run a java program in your website? Its kind of confusing how to word it but I have this:
Its really simple java where all it does is make a rectangle lol, but I'm still learning, and I want it to run through a web browser on my website...
Code:
//Rectangle Program
import java.awt.*;
import hsa.Console;
public class Rectangle Program
{
static Console c;
public static void main (String[] args)
{
c = new Console ();
int length, width;
c.println("RECTANGLE PROGRAM");
c.println("Type in the length of the rectangle and hit <Enter>");
length = c.readInt();
c.println("Type in the width of the rectangle and hit <Enter>");
width = c.readInt();
c.setColor(Color.green);
c.fillRect(100,100,length,width);
}
}