Trying to run Program in Ecplise as a class × 259989
<p>I am a newbie in the Java world and this is among my first programs (Hello World, obviously!). The problem is when I try to run this program as a class from the menu with a play icon on it, a blank window shows up with no "Hello World" on it (just white colour filling the window). At the bottom border of this window there is a black thick line. But when I run this program as an applet from the same menu everything is okay and the "Hello World" shows at the right position and everything is fine. But how can I make the program run regularly as a class???</p>

<p>This is my code...</p>

<pre><code>import acm.graphics.*;
import acm.program.*;
import java.awt.*;

public class HelloProgram extends GraphicsProgram {

    private static final long serialVersionUID = 1L;

    public void run() {
        GLabel label = new GLabel("hello, world", 100, 75);
        label.setFont("SansSerif-36");
        label.setColor(Color.RED);
        add(label);
    }

}
</code></pre>
