<p>import java.awt.*;</p><p>import javax.swing.*;</p><p>public class wz extends JFrame{</p><p>JButton a1,a2,a3,a4,a5;</p><p>public void wz(){</p><p>a1=new JButton("1");</p><p>a2=new JButton("2");</p><p>a3=new JButton("3");</p><p>a4=new JButton("4");</p><p>a5=new JButton("5");</p><p>this.add(a1,BorderLayout.NORTH);</p><p>this.add(a2,BorderLayout.SOUTH);</p><p>this.add(a3,BorderLayout.CENTER);</p><p>this.add(a4,BorderLayout.WEST);</p><p>this.add(a5,BorderLayout.EAST);</p><p>this.setTitle("6");</p><p>this.setSize(50,100);</p><p>this.setLocation(350,250);</p><p>this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);</p><p>this.setVisible(true);</p><p>}</p><p>public static void main(String[] args){</p><p>wz abc=new wz();</p><p>}</p><p></p><p>}</p><p><br></p>
大家看一下我这个代码,编译过了但是为什么运行没结果
发布时间:2020-03-25 07:41