Create an Image in JDialog
Hi,
I am using Eclipse to create a GUI application.
My problem is this... When I run it in Eclipse it finds the images just fine and they show up perfectly... But when I export to a JAR file, the image files either are distorted or don't show up at all... I am not sure if this is my coding or the JAR file...
package iWeatherGrabber;
imports... I got them
public class WindowSplash extends JDialog {
private JLabel useForImage;
ImageIcon logo = new ImageIcon("logo.gif");
Container contentPane;
public WindowSplash () {
contentPane = getContentPane();
setTitle("iWeatherGrabber");
setSize(FRAME_WIDTH, FRAME_HEIGHT);
setLocationRelativeTo(null);
setUndecorated(true);
setForeground(Color.blue);
setLayout(null);
contentPane.setBackground(Color.LIGHT_GRAY);
JPanel Border = new JPanel();
Border.setLayout(null);
Border.setBackground(Color.LIGHT_GRAY);
Border.setBounds(0, 0, FRAME_WIDTH, FRAME_HEIGHT);
contentPane.add(Border);
JPanel main = new JPanel();
main.setLayout(null);
main.setBackground(Color.WHITE);
main.setBounds(5, 5, FRAME_WIDTH-10, FRAME_HEIGHT-10);
Border.add(main);
useForImage = new JLabel(logo);
useForImage.setBounds(5,10,440,51);
main.add(useForImage);
}
}
Message was edited by:
jay2cool

