Here is my code for displaying an image but doesnt work. It runs but displays nothing!
[CODE=JAVA]
import javax.swing.*;
import java.awt.*;
public class Frame extends JFrame
{
private JLabel irishrail;
public Frame()
{
super("Frame");
Container c = getContentPane( );
setSize(600,550 );
irishrail = new JLabel(new ImageIcon("iarn rod.bmp"));
c.add(irishrail );
setVisible(true );
}
public static void main(String args[])
{
Frame frame = new Frame();
}
}
[/CODE]
[CODE=JAVA]
import javax.swing.*;
import java.awt.*;
public class Frame extends JFrame
{
private JLabel irishrail;
public Frame()
{
super("Frame");
Container c = getContentPane( );
setSize(600,550 );
irishrail = new JLabel(new ImageIcon("iarn rod.bmp"));
c.add(irishrail );
setVisible(true );
}
public static void main(String args[])
{
Frame frame = new Frame();
}
}
[/CODE]
Comment