为什么看不到按钮呢
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class HH extends JPanel
{
public HH()
{
JButton JB1=new JButton("asdfsa");
JButton JB2=new JButton("sadfasf");
JB2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
System.exit(0);
}
});
JB1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
System.exit(0);
}
});
this.setLayout(null);
JB1.setBounds(0,0,1156,1132);
JB2.setBounds(57,0,1156,1132);
add(JB1);
add(JB2);
show();
}
}
public class H extends JFrame
{
public H()
{
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(new HH(),BorderLayout.NORTH);
setSize(600,400);
show();
}
public static void main(String args[])
{
new H();
}
}