Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

no main classes found?

807598Sep 28 2006 — edited Sep 28 2006
Hello im using netbeans and im fairly new at java and i have no idea y this keeps saying no main classes found? ne suggestions would be appreciated

/*
 * Main.java
 *
 * Created on September 28, 2006, 8:04 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package square;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;

/**
 *
 * @author Owner
 */
public class Main {
    public class square extends Canvas {
            square() {
                setSize(200,200);
                setBackground(Color.GREEN);
            }
            public void paint(Graphics g) {
                g.setColor(Color.ORANGE);
                g.fillRect(50,50,100,100);
            }
    }
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2006
Added on Sep 28 2006
11 comments
245 views