Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassNotFoundException: java.awt.Graphics2D

 
Vic Brown
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea why this causes my java console to error with a ClassNotFoundException: java.awt.Graphics2D ?
public void paint(Graphics g) {
Graphics2D newG = (Graphics2D) g;
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because Graphics2D is a class that was introduced in Java 2... most browsers only support Java 1.1. You're going to need to either change your program not to use the Java2D API, or make users download the Java2 Plugin from Sun to run your applet.

-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic