inolikegettingbanned
inolikegettingbanned

Reputation: 19

How to use acm.jar in eclipse?

I am learning Java by Stanford's Programming methodology videos on YouTube and I'm using the latest version of eclipse not the Stanford version. After I add acm.jar to the build path I still get a red underline under GLabel and error messages. This is what I've got:

import acm.program.*;

public class Artistry extends GraphicsProgram {
public void run() {

        add(new GLabel("hello, world"), 100, 75);
        }

}

Does anyone have any idea how to fix this? I really appreciate any help. Thanks :)

Upvotes: 0

Views: 777

Answers (1)

MatrixNinja
MatrixNinja

Reputation: 137

its because you also need to add: import acm.graphics.GLabel;

-or-

if you're going to use other G[something] you can add: import acm.graphics.*;

Upvotes: 1

Related Questions