Hello All,
I'm facing a strange behavior with my code
My code is composed of several classes.
Even new in
Java, I have tried to code as scrupulous as possible, and have tested individually each classes.
All seems to work individually as expected.
Now there is a time that you have to put all together, and from here I'm facing following problem
Java Version : jre8
IDE Eclipse IDE
By running the code (through Eclipse), in order to open a new window, I have to click several times on a "label button" before to have any reaction that new window to popup.
After 2, or 3 attempts finally the new windows popups
FYI: No error are highlighted in Eclipse when I run the code
See image : "Button to Click"
Now when I run the code directly in a cmd window , then I get,
"sometimes, but not always" following error
>java -jar PAC-Tool.jar
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: input
== null!
at javax.imageio.ImageIO.read(Unknown Source)
at pacp.WinMeasurePoints.initialize(WinMeasurePoints.java:194)
at pacp.WinMeasurePoints.<init>(WinMeasurePoints.java:136)
at pacp.WinPrime$31.mouseClicked(WinPrime.java:1380)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
The error is pointing on line 194 in : WinMeasurePoints
After clicking several times the results OK: See image : "Button reaction OK"
What is wrong here ?
Why my code is running sometimes and sometimes not ?
Thanks for your help and eventually suggestion to troubleshoot
Regards
Christian
My Class in question..