我想在活动面板中动态地显示图片,下面的代码为什么不能啊,往面板中添加任何东西都没有反应,求解。(不用容器可以实现吗??)
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
public class JScrollPaneShowPicture1 extends JFrame {
private JScrollPane jsp = new JScrollPane();
private JPanel jp = new JPanel();
private JLabel jl1 = new JLabel();
private JLabel jl2 = new JLabel();
//private JButton jb = new JButton("测试");

public JScrollPaneShowPicture1() {

this.initialData();
this.initialPanel();
this.initialFrame();
}

public void initialPanel() {
//jp.setLayout(null);
//jb.setBounds(10, 10, 100, 30);
//jp.add(jb);
jp.add(jl1);
jp.add(jl2);
jsp.add(jp);

}
public void initialData() {

jl1.setIcon(new ImageIcon("G:/001.png"));
jl2.setIcon(new ImageIcon("G:/002.png"));

}
public void initialFrame() {

this.add(jsp);
this.setBounds(100, 100, 500, 550);
this.setVisible(true);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);

}

public static void main(String[] args) {
new JScrollPaneShowPicture1();
}

}