bueno cuando ejecuto mi proyecto IDE si salen la imágenes y cuando lo ejecuto desde el .jar no me salen las imágenes.
Código Java:
Ver original
package JOptionPane_Imagenes; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JOptionPane; Icon Guardar, Eliminar, Actualizar, Salir; public JOptionPane_Imagenes() { initComponents(); setLocationRelativeTo(null); setBounds(350, 330, 713, 120); } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JOptionPane_Imagenes/salir.png"))); // NOI18N jButton1.setText("SALIR"); jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 10, 150, 60)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JOptionPane_Imagenes/guardar.png"))); // NOI18N jButton2.setText("GUARDAR"); jButton2ActionPerformed(evt); } }); getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 150, 60)); jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JOptionPane_Imagenes/remove.png"))); // NOI18N jButton3.setText("ELIMINAR"); jButton3ActionPerformed(evt); } }); getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 10, 150, 60)); jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/JOptionPane_Imagenes/update.png"))); // NOI18N jButton4.setText("ACTUALIZAR"); jButton4ActionPerformed(evt); } }); getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 10, 170, 60)); pack(); }// </editor-fold> JOptionPane.showMessageDialog(null, "SE A GUARDADO EXITOSAMENTE", "GUARDAR", JOptionPane.WARNING_MESSAGE, Guardar); } JOptionPane.showMessageDialog(null, "SE A ELIMINADO EXITOSAMENTE", "ELIMINAR", JOptionPane.WARNING_MESSAGE, Eliminar); } JOptionPane.showMessageDialog(null, "SE A ACTUALIZADO EXITOSAMENTE", "ACTUALIZAR", JOptionPane.WARNING_MESSAGE, Actualizar); } } public void run() { new JOptionPane_Imagenes().setVisible(true); } }); } // Variables declaration - do not modify // End of variables declaration }