[Impression] Exception in thread "AWT-EventQueue-0"
Bonjour,
J'ai un problème d'impression : j'ai changé de réseau et l'impression ne marche plus.
Le code marche sur une imprimante réseau et une imprimante normale. Toutefois, avec le nouveau réseau ça ne marche pas. L'erreur d'éclarée est la suivante :
Code:
1 2 3
| Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.print.ProxyPrintGraphics
at JPanelHisto.paintComponent(JPanelHisto.java:44)
at javax.sxing.JComponent.printComponent(Unknown Source) |
où la ligne 44 correspond à Graphics2D g2 = (Graphics2D)g;
dans le code suivant :
Code:
1 2 3 4 5 6 7 8 9
| paintComponent{
super.paintComponent(g);
...
Graphics2D g2 = (Graphics2D)g;
...
g2.draw............
.....
} |
Je sais pas trop quoi faire.
Merci d'avance