Netbeans jar file icon problems

Posted by Erma on Stack Overflow See other posts from Stack Overflow or by Erma
Published on 2011-01-09T19:25:03Z Indexed on 2011/01/09 19:53 UTC
Read the original article Hit count: 368

Filed under:
|
|
|
|

I finally found how to make an exe project in Netbeans, so a jar file and execute it from the DESKTOP.

The only problem I have ocurred is that after I open the jar file and login with my username and password the button icons are not shown, if I put a string it appears but if I put the image it doesn't appear.

So,I had to restore this code:

    JButton btnNew = new JButton(new ImageIcon("new.gif"));
JButton btnUpdate = new JButton(new ImageIcon("NotePad.gif"));
JButton btnDelete = new JButton(new ImageIcon("delete.gif"));
JButton btnSearch = new JButton(new ImageIcon("find.gif"));

and put this one:

  JButton btnNew = new JButton("ADD");
JButton btnUpdate = new JButton("Update");
JButton btnDelete = new JButton("Delete");
JButton btnSearch = new JButton("Search");

It now works but I would like to have the icons please.

Any idea?

© Stack Overflow or respective owner

Related posts about java

Related posts about image