I'm creating a program that will create a series of rectangles. When I run the program, I get the error that "Rectangle1 class wasn't found in Problem_3_1 Project. I am using NetBeans 8.1. Here is my code.
import javax.swing.JApplet;
import java.awt.*;
public class Rectangle1 extends JApplet {
public void paint(Graphics page) {
page.drawRect(10, 10, 10, 10);
}
}
Error:
Main method not found in class Rectangle1, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application C:\Users\z2054321\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds)