File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Class Graphics2D not found" Watch "Class Graphics2D not found" New topic
Author

Class Graphics2D not found

Theresa Duick
Greenhorn

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 ScreenTest.java
ScreenTest.java:13: Class Graphics2D not found.
Graphics2D screen2D = (Graphics2D)screen;
ScreenTest.java:14: Class GradientPaint not found.
GradientPaint pat = new GradientPaint(0f,0f,Color.white,110f,45f,Color.b
lue);
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20271
    ∞

Are you importing java.awt.* ; ??


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

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: http://aspose.com/file-tools
 
subject: Class Graphics2D not found
 
Similar Threads
Transparent JTree over gradient background
Simple Gui Question (Head First Java)
jButton fill colour
changing background color of JFrame
Using GradientPaint and Swing Components