MainFrame.java~1~
资源名称:Java.rar [点击查看]
上传用户:liming9091
上传日期:2014-10-27
资源大小:3376k
文件大小:2k
源码类别:
Java编程
开发平台:
Java
- package manpowersystem;
- import javax.swing.*;
- import java.awt.event.*;
- import java.awt.*;
- import com.borland.jbcl.layout.*;
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: </p>
- * @author not attributable
- * @version 1.0
- */
- public class MainFrame extends JFrame {
- XYLayout xYLayout1 = new XYLayout();
- JPanel jPanel1 = new JPanel();
- XYLayout xYLayout2 = new XYLayout();
- JPanel jPanel2 = new JPanel();
- public MainFrame() {
- try {
- jbInit();
- }
- catch(Exception e) {
- e.printStackTrace();
- }
- }
- public static void main(String[] args) {
- MainFrame mainFrame = new MainFrame();
- mainFrame.validate();
- mainFrame.setLocation(200,150);
- mainFrame.setSize(600,480);
- mainFrame.setVisible(true);
- mainFrame.pack();
- }
- private void jbInit() throws Exception {
- xYLayout1.setWidth(525);
- xYLayout1.setHeight(407);
- this.getContentPane().setBackground(new Color(210, 138, 177));
- this.setLocale(java.util.Locale.getDefault());
- this.setResizable(true);
- this.addWindowListener(new MainFrame_this_windowAdapter(this));
- this.getContentPane().setLayout(xYLayout1);
- jPanel1.setLayout(xYLayout2);
- jPanel1.setBackground(new Color(210, 138, 177));
- this.getContentPane().add(jPanel1, new XYConstraints(3, 4, 297, 402));
- this.getContentPane().add(jPanel2, new XYConstraints(304, 0, 220, 409));
- }
- void this_windowClosed(WindowEvent e) {
- System.exit(0);
- }
- }
- class MainFrame_this_windowAdapter extends java.awt.event.WindowAdapter {
- MainFrame adaptee;
- MainFrame_this_windowAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void windowClosed(WindowEvent e) {
- adaptee.this_windowClosed(e);
- }
- }