Eclipse Windowbuilder Pro - Export Project

Asked

Viewed 216 times

0

I’m having trouble exporting my project with icons.

1º Export -> "Runnable jar file"
2º I leave the first option marked.
3º When I run on Linux or on another machine other than mine the icons are not displayed at all.

One of the labels looks like this:

lblIcone.setIcon(new ImageIcon(
   ".\\- Projetos\\Pizzaria\\src\\Icones\\ecommerce-and-business-icons\\128\\company.png"));

Someone could guide me how to solve this?

  • If you copy your images and place them next to your exported . jar will work. This solves for you or Voce needs the images to go inside your jar?

1 answer

0

Solved:

1º Create a "Folder" inside the "src" and then just drag the icons/images inside the "Folder" and change the code below:

For label, button etc.

btSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/deskclin/resources/sair_menu.png")));

Browser other questions tagged

You are not signed in. Login or sign up in order to post.