写在之前:
注意:
1、setSize()和setLocation()、setBounds()的关系
查看源码 发现 setSize()和setLocation()其实都调用了setBounds()方法 所以只需要setBounds就可以同时设置大小及其坐标位置了 setSize()和setLocation()是单独对其大小或者坐标位置设定时才调用
ImageIcon放入Jlabel配合Jbutton 来按钮点击循环显示图片和隐藏图片
jb.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(jl.isVisible()==true)
{
jl.setVisible(