www.pudn.com > 距离矢量路由模拟.rar > RooterFrame1.java~1~
package rooter; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** *Title:
*Description:
*Copyright: Copyright (c) 2005
*Company:
* @author not attributable * @version 1.0 */ public class RooterFrame1 extends JFrame { JPanel contentPane; JLabel statusBar = new JLabel(); BorderLayout borderLayout1 = new BorderLayout(); //Construct the frame public RooterFrame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { contentPane = (JPanel) this.getContentPane(); contentPane.setLayout(borderLayout1); this.setSize(new Dimension(400, 300)); this.setTitle("Frame Title"); statusBar.setText(" "); contentPane.add(statusBar, BorderLayout.SOUTH); } //Overridden so we can exit when window is closed protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } } }