D
Daniel
Hello,
Sometimes (not very frequent thank god) I get the following
NullPointerException when i start my application. If I just restart
the application (i.e no change in the code) it starts fine. As you
can see it is constructors that cause this. What is strange is that on
the line in EventLog that causes this is this line:
private JFileChooser filec= new JFileChooser();
(and in MainWindow I have
private EventLog eventLog = new EventLog();
)
So what can be the issue here? Is it something I do that I should not,
or is it something I don't do that I should?
I kind of feel I am actually innocent of causing this, but I may be
wrong of course
any thoughts are welcome.
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:161)
at javax.swing.ImageIcon.<init>(ImageIcon.java:147)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$ShortCutPanel.<init>(WindowsFileChooserUI.java:603)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(WindowsFileChooserUI.java:361)
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:130)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:176)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at se.wexiodisk.service.EventLog.<init>(EventLog.java:69)
at se.wexiodisk.service.MainWindow.<init>(MainWindow.java:72)
at
se.wexiodisk.service.Diagnosetool.<init>(Diagnosetool.java:37)
at
se.wexiodisk.service.Diagnosetool.main(Diagnosetool.java:53)
regards
Daniel
Sometimes (not very frequent thank god) I get the following
NullPointerException when i start my application. If I just restart
the application (i.e no change in the code) it starts fine. As you
can see it is constructors that cause this. What is strange is that on
the line in EventLog that causes this is this line:
private JFileChooser filec= new JFileChooser();
(and in MainWindow I have
private EventLog eventLog = new EventLog();
)
So what can be the issue here? Is it something I do that I should not,
or is it something I don't do that I should?
I kind of feel I am actually innocent of causing this, but I may be
wrong of course
any thoughts are welcome.
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:161)
at javax.swing.ImageIcon.<init>(ImageIcon.java:147)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$ShortCutPanel.<init>(WindowsFileChooserUI.java:603)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(WindowsFileChooserUI.java:361)
at
javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:130)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(WindowsFileChooserUI.java:176)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at se.wexiodisk.service.EventLog.<init>(EventLog.java:69)
at se.wexiodisk.service.MainWindow.<init>(MainWindow.java:72)
at
se.wexiodisk.service.Diagnosetool.<init>(Diagnosetool.java:37)
at
se.wexiodisk.service.Diagnosetool.main(Diagnosetool.java:53)
regards
Daniel