You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I recently tried to use VectorGraphics2D with the method indicated in the usage section. I declare somewhere in my application:
Graphics2D g2 = new VectorGraphics2D();
At run time, on this statement:
CommandSequence commands = ((VectorGraphics2D) g2).getCommands();
I get a cast error:
Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: sun.java2d.SunGraphics2D cannot be cast to de.erichseifert.vectorgraphics2d.VectorGraphics2D
and I don't understand what happens. What is wrong ?
I tried several java versions, from 8 to 11, the last one is openjdk 11.0.7-ea 2020-04-14.
Thanks in advance for your help !
The text was updated successfully, but these errors were encountered:
Hello,
I recently tried to use VectorGraphics2D with the method indicated in the usage section. I declare somewhere in my application:
Graphics2D g2 = new VectorGraphics2D();
At run time, on this statement:
CommandSequence commands = ((VectorGraphics2D) g2).getCommands();
I get a cast error:
Exception in thread "AWT-EventQueue-1" java.lang.ClassCastException: sun.java2d.SunGraphics2D cannot be cast to de.erichseifert.vectorgraphics2d.VectorGraphics2D
and I don't understand what happens. What is wrong ?
I tried several java versions, from 8 to 11, the last one is openjdk 11.0.7-ea 2020-04-14.
Thanks in advance for your help !
The text was updated successfully, but these errors were encountered: