I cannot figure out why my program will not run i feel retarted in net beans it keeps sayin no main class selected im lost please help if you can!!
import java.awt.*;
/**
* Neonapplet.java for Logo and Name
*/
public class NeonApplet extends java.applet.Applet implements Runnable
{
Thread blinker = null; // The thread that displays images
String labelString; // The label for the window
int delay; // the delay time between blinks
public void init() {
String blinkFrequency = getParameter("speed");
delay = (blinkFrequency == null) ? 400 :
(1000 / Integer.parseInt(blinkFrequency));
labelString = getParameter("lbl");
if (labelString == null)
labelString = "Xcellent Computers";
Font font = new java.awt.Font("Serif", Font.BOLD, 30);
setFont(font);
}
public void paint(Graphics g) {
int fontSize = g.getFont().getSize();
int x = 200, y = fontSize, space;
int red = (int)( 50 );
int green = (int)( 50 );
int blue = (int)(50);
Dimension d = getSize();
g.setColor(Color.black);
FontMetrics fm = g.getFontMetrics();
space = fm.stringWidth(" ");
Graphics2D g2d = (Graphics2D)g;
g.setColor(new java.awt.Color(0,10,255));
g.drawString(labelString,50,50);
g.setColor(new java.awt.Color(0,255,10));
g2d.draw3DRect (80, 70, 80, 60,true);
g2d.draw3DRect (90, 135, 60, 20,true);
g2d.drawOval(155,140,10,15);
try{
Thread.currentThread().sleep(300);
} catch (InterruptedException e) { }
g.setColor(new java.awt.Color(255,255,10));
g.drawString(labelString,50,50);
g.setColor(new java.awt.Color(0,15,255));
g2d.draw3DRect (80, 70, 80, 60,true);
g2d.draw3DRect (90, 135, 60, 20,true);
g2d.drawLine(90,80,150,120);
g2d.drawLine(150,80,90,120);
g2d.drawOval(155,140,10,15);
}
public void start() {
blinker = new Thread(this);
blinker.start();
}
public void stop() {
blinker = null;
}
public void run() {
Thread me = Thread.currentThread();
while (blinker == me) {
try {
Thread.currentThread().sleep(delay);
}
catch (InterruptedException e) {
}
repaint();
}
}
public String getAppletInfo() {
return "Title: Blinker";
}
public String[][] getParameterInfo() {
String pinfo[][] = {
{"speed", "string", "The blink frequency"},
{"lbl", "string", "The text to blink."},
};
return pinfo;
}
}