21天学习java源码

源代码在线查看: border.java

软件大小: 436 K
上传用户: cong328
关键词: java 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				import java.awt.*;
				import java.awt.event.*;
				import javax.swing.*;
				
				class Border extends JFrame {
				    JButton north = new JButton("North");
				    JButton south = new JButton("South");
				    JButton east = new JButton("East");
				    JButton west = new JButton("West");
				    JButton center = new JButton("Center");
				
				    Border() {
				        super("Border");
				        setSize(240, 280);
				        JPanel pane = new JPanel();
				        pane.setLayout(new BorderLayout());
				        pane.add("North", north);
				        pane.add("South", south);
				        pane.add("East", east);
				        pane.add("West", west);
				        pane.add("Center", center);
				        setContentPane(pane);
				    }
				
				    public static void main(String[] arguments) {
				        JFrame frame = new Border();
				        ExitWindow exit = new ExitWindow();
				        frame.addWindowListener(exit);
				        frame.show();
				    }
				}
				
							

相关资源