This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Applets and the fly likes Class Graphics2D not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Class Graphics2D not found" Watch "Class Graphics2D not found" New topic

Class Graphics2D not found

Theresa Duick

Joined: Feb 16, 2000
Posts: 27
I'm receiving the following error message when I attempt to use Graphics2D & GradientPaint in my code. Since this is part of Java 2, I wondering does this mean that I don't have it properly installed? Please help.
C:\J21work>javac Class Graphics2D not found.
Graphics2D screen2D = (Graphics2D)screen; Class GradientPaint not found.
GradientPaint pat = new GradientPaint(0f,0f,Color.white,110f,45f,Color.b
paul wheaton

Joined: Dec 14, 1998
Posts: 20896

Are you importing java.awt.* ; ??

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Theresa Duick

Joined: Feb 16, 2000
Posts: 27
Thanks! That solved my problem. I imported several individual awt classes, but not the whole lot.
I agree. Here's the link:
subject: Class Graphics2D not found
It's not a secret anymore!