|
Error message:
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:97)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:106)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
Source code:
private void jbInit() throws Exception {
setIconImage(Toolkit.getDefaultToolkit().createImage(Frame3.class.getResource("logo.gif")));
contentPane = (JPanel) getContentPane();
contentPane.setLayout(borderLayout1);
this.setJMenuBar(jMenuBar1);
setSize(new Dimension(400, 300));
setTitle("Main Menu");
jMenu1.setText("sdfsd");
jMenuItem1.setText("ssdfsdf");
jMenuItem2.setText("sdf");
jMenuItem3.setText("sd");
jMenuItem4.setText("sdfsdf");
jMenuBar1.setOpaque(false);
jMenuBar1.add(jMenu1);
jMenu1.add(jMenuItem1);
jMenu1.add(jMenuItem2);
jMenu1.add(jMenuItem3);
jMenu1.add(jMenuItem4);
} |
|