RecordPane.java~1~
上传用户:liming9091
上传日期:2014-10-27
资源大小:3376k
文件大小:6k
源码类别:

Java编程

开发平台:

Java

  1. package manpowersystem;
  2. /**
  3.  * <p>Title: </p>
  4.  * <p>Description: </p>
  5.  * <p>Copyright: Copyright (c) 2003</p>
  6.  * <p>Company: </p>
  7.  * @author not attributable
  8.  * @version 1.0
  9.  */
  10. import javax.swing.*;
  11. import com.borland.jbcl.layout.*;
  12. import java.awt.*;
  13. import java.awt.event.*;
  14. public class RecordPane extends JFrame {
  15.     RecordItem item = new RecordItem();
  16.     Database database = new Database();
  17.     XYLayout xYLayout1 = new XYLayout();
  18.     JTextField jEmployeeIDTextField = new JTextField();
  19.     JTextField jEmployeeNameTextField = new JTextField();
  20.     JTextField jDateTimeTextField = new JTextField();
  21.     JTextField jReasonTextField = new JTextField();
  22.     JButton jOKButton = new JButton();
  23.     JButton jExitButton = new JButton();
  24.     JButton jResetButton = new JButton();
  25.     JLabel jIDLabel1 = new JLabel();
  26.     JLabel jIDLabel2 = new JLabel();
  27.     JLabel jIDLabel3 = new JLabel();
  28.     JLabel jIDLabel4 = new JLabel();     JPanel jClockPanel = new JPanel();
  29.     public RecordPane() {
  30.         try {
  31.             jbInit();
  32.         }
  33.         catch ( Exception e ) {
  34.             e.printStackTrace();
  35.         }
  36.     }
  37.     public static void main( String[] args ) {
  38.         RecordPane recordPane1 = new RecordPane();
  39.     }
  40.     private void jbInit() throws Exception {
  41.         this.getContentPane().setBackground( new Color( 210, 138, 177 ) );
  42.         this.setFont( new java.awt.Font( "DialogInput", 1, 14 ) );
  43.         this.setTitle( "请添加相应记录" );
  44.         this.getContentPane().setLayout( xYLayout1 );
  45.         xYLayout1.setWidth( 657 );
  46.         xYLayout1.setHeight( 274 );
  47.         jOKButton.setBackground( new Color( 212, 158, 217 ) );
  48.         jOKButton.setFont( new java.awt.Font( "DialogInput", 1, 14 ) );
  49.         jOKButton.setText( "确定" );
  50.         jOKButton.addActionListener( new RecordPane_jOKButton_actionAdapter( this ) );
  51.         jExitButton.setText( "退出" );
  52.         jExitButton.addActionListener( new RecordPane_jExitButton_actionAdapter( this ) );
  53.         jExitButton.setBackground( new Color( 212, 158, 217 ) );
  54.         jExitButton.setFont( new java.awt.Font( "DialogInput", 1, 14 ) );
  55.         jResetButton.setText( "重写" );
  56.         jResetButton.addActionListener( new
  57.                                         RecordPane_jResetButton_actionAdapter( this ) );
  58.         jResetButton.setBackground( new Color( 212, 158, 217 ) );
  59.         jResetButton.setFont( new java.awt.Font( "DialogInput", 1, 14 ) );
  60.         jReasonTextField.setText( "" );
  61.         jEmployeeIDTextField.setText( "" );
  62.         jEmployeeNameTextField.setText( "" );
  63.         jIDLabel1.setText( "姓名" );
  64.         jIDLabel1.setFont( new java.awt.Font( "SansSerif", 1, 18 ) );
  65.         jIDLabel2.setFont( new java.awt.Font( "SansSerif", 1, 18 ) );
  66.         jIDLabel2.setText( "时间" );
  67.         jIDLabel3.setFont( new java.awt.Font( "SansSerif", 1, 18 ) );
  68.         jIDLabel3.setText( "备注" );
  69.         jIDLabel4.setFont( new java.awt.Font( "SansSerif", 1, 18 ) );
  70.         jIDLabel4.setText( "工号" );
  71.         jDateTimeTextField.setText("");
  72.         jClockPanel.setBackground(new Color(210, 138, 177));         this.getContentPane().add( jEmployeeNameTextField,
  73.                                    new XYConstraints( 108, 83, 89, 31 ) );
  74.         this.getContentPane().add( jEmployeeIDTextField,
  75.                                     new XYConstraints(15, 83, 81, 31) );
  76.         this.getContentPane().add( jReasonTextField,
  77.                                    new XYConstraints( 351, 83, 123, 110 ) );
  78.         this.getContentPane().add( jOKButton,
  79.                                    new XYConstraints( 91, 220, -1, 35 ) );
  80.         this.getContentPane().add( jResetButton,
  81.                                    new XYConstraints( 206, 220, -1, 35 ) );
  82.         this.getContentPane().add( jExitButton,
  83.                                    new XYConstraints( 318, 220, -1, 35 ) );
  84.         this.getContentPane().add( jIDLabel2,
  85.                                    new XYConstraints( 223, 49, 80, 18 ) );
  86.         this.getContentPane().add( jIDLabel1,
  87.                                    new XYConstraints( 121, 49, 80, 18 ) );
  88.         this.getContentPane().add( jIDLabel4, new XYConstraints( 25, 49, 80, 18 ) );
  89.         this.getContentPane().add( jIDLabel3,
  90.                                    new XYConstraints( 364, 49, 80, 18 ) );
  91.         this.getContentPane().add(jDateTimeTextField,      new XYConstraints(213, 83, 113, 31));         this.getContentPane().add(jClockPanel,  new XYConstraints(490, 46, 154, 185));
  92.     }
  93.     void jExitButton_actionPerformed( ActionEvent e ) {
  94.         this.dispose();
  95.     }
  96.     void jResetButton_actionPerformed( ActionEvent e ) {
  97.         jEmployeeIDTextField.setText( "" );
  98.         jEmployeeNameTextField.setText( "" );
  99.         jReasonTextField.setText( "" );
  100.         jDateTimeTextField.setText( "" );
  101.     }
  102.     void jOKButton_actionPerformed( ActionEvent e ) {
  103.         RestoreRecord();
  104.     }
  105.     public void RestoreRecord() {
  106.     }
  107. }
  108. class RecordPane_jExitButton_actionAdapter implements java.awt.event.
  109.     ActionListener {
  110.     RecordPane adaptee;
  111.     RecordPane_jExitButton_actionAdapter( RecordPane adaptee ) {
  112.         this.adaptee = adaptee;
  113.     }
  114.     public void actionPerformed( ActionEvent e ) {
  115.         adaptee.jExitButton_actionPerformed( e );
  116.     }
  117. }
  118. class RecordPane_jResetButton_actionAdapter implements java.awt.event.
  119.     ActionListener {
  120.     RecordPane adaptee;
  121.     RecordPane_jResetButton_actionAdapter( RecordPane adaptee ) {
  122.         this.adaptee = adaptee;
  123.     }
  124.     public void actionPerformed( ActionEvent e ) {
  125.         adaptee.jResetButton_actionPerformed( e );
  126.     }
  127. }
  128. class RecordPane_jOKButton_actionAdapter implements java.awt.event.
  129.     ActionListener {
  130.     RecordPane adaptee;
  131.     RecordPane_jOKButton_actionAdapter( RecordPane adaptee ) {
  132.         this.adaptee = adaptee;
  133.     }
  134.     public void actionPerformed( ActionEvent e ) {
  135.         adaptee.jOKButton_actionPerformed( e );
  136.     }
  137. }