import java.applet.Applet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
public class Main extends Applet
{
/**
*
*/
private static final long serialVersionUID = 1L;
private Image Logo = null;
private Image Start = null;
public void init()
{
try
{
MediaTracker imageWait = new MediaTracker(this);
Logo = this.getImage(getClass().getResource("images/Logo.png"));
Start = this.getImage(getClass().getResource("images/Start.png"));
imageWait.addImage(Logo, 1);
imageWait.addImage(Start, 1);
// Wait for the image to load
imageWait.waitForAll();
}
catch (Exception e)
{
e.printStackTrace();
}
// TODO: Initialization things here.
}
/**
* This is where things will get drawn to the screen within your applet.
*/
public void paint(Graphics g)
{
// Draw our hello world
Font myFont = new Font("Ariel", Font.BOLD, 17);
g.setColor(new Color(236, 236, 236));
g.fillRect(2, 6, 640, 480);
g.setColor(Color.RED);
g.setFont(myFont);
g.drawString("In a world of Oranges and Grapes, A hero must rise and save Questia", 25, 25);
g.drawImage(Logo, -9, 50, null);
g.drawImage(Start, -9, 50, null);
setSize(624, 500);
g.drawString("Live, Build, Explore!!!!", 200, 290);
g.drawString("E10", 590, 470);
}
}