为什么不出现界面
我在jbulider 下运行下面的程序,
package ImageLabel;
import java.applet.*;
import java.awt.*;
import javax.swing.*;
public class ImageLabelApplet extends JApplet
{
public void init()
{
Image image = getImage(getCodeBase(),"dog.gif");
ImageIcon icon = new ImageIcon(image);
JButton button = new JButton(icon);
Image rollImage = getImage(getCodeBase(),"dog-roll.gif");
ImageIcon rollIcon = new ImageIcon(rollImage);
button.setRolloverIcon (rollIcon);
Image pressImage = getImage(getCodeBase(),"dog-press.gif");
ImageIcon pressIcon = new ImageIcon(pressImage);
button.setPressedIcon (pressIcon);
getContentPane().setLayout (new FlowLayout());
getContentPane().add (button,BorderLayout.NORTH );
}
}
为什么没有出现运行的界面,也就是图片及容纳他的界面