Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8126597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:12:17+00:00 2026-06-06T07:12:17+00:00

I am a newbie in the Java world and this is among my first

  • 0

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???

This is my 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);
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:12:19+00:00Added an answer on June 6, 2026 at 7:12 am

    I have no idea about acm, but looked in this page: http://jtf.acm.org/tutorial/Introduction.html

    As you see there GraphicsProgram is a subclass of JApplet and because of that it’s supposed to be run as applet, not desktop application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im totally newbie to java world and this my first 4 lines of codes
I am trying to learn Java now and this is the hello world program
First off, I come from a RDBMS/SQL/C++/Java/Python background and I'm a newbie to Gaelyk,
I am a newbie java dev using netbeans IDE 7.1.1 and im watching this
I'm a newbie on Java EE and got a problem that I don't understand
I'm a newbie to Java and I'm confused about something: In the simple hello
I'm a newbie in java and I have a small problem. I want to
Just a simple question from a relative Java newbie: what is the difference between
I am a newbie to J2me. I am programming a Java program to recognise
I am a newbie to java and android world, and I want to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.