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

Java编程

开发平台:

Java

  1. package infomanagement;
  2. import java.awt.*;
  3. import java.awt.event.*;
  4. import javax.swing.*;
  5. import com.borland.jbcl.layout.*;
  6. import javax.swing.border.*;
  7. /**
  8.  * <p>Title: </p>
  9.  * <p>Description: </p>
  10.  * <p>Copyright: Copyright (c) 2003</p>
  11.  * <p>Company: </p>
  12.  * @author unascribed
  13.  * @version 1.0
  14.  */
  15. public class Frame1 extends JFrame {
  16.   private JPanel contentPane;
  17.   private BorderLayout borderLayout1 = new BorderLayout();
  18.   private JPanel jPanel1 = new JPanel();
  19.   private XYLayout xYLayout1 = new XYLayout();
  20.   private JLabel jLabel1 = new JLabel();
  21.   private TitledBorder titledBorder1;
  22.   private JLabel jLabel2 = new JLabel();
  23.   private JLabel jLabel3 = new JLabel();
  24.   private JLabel jLabel4 = new JLabel();
  25.   private JRadioButton jRadioButton1 = new JRadioButton();
  26.   private JRadioButton jRadioButton2 = new JRadioButton();
  27.   private JRadioButton jRadioButton3 = new JRadioButton();
  28.   private JRadioButton jRadioButton4 = new JRadioButton();
  29.   //Construct the frame
  30.   public Frame1() {
  31.     enableEvents(AWTEvent.WINDOW_EVENT_MASK);
  32.     try {
  33.       jbInit();
  34.     }
  35.     catch(Exception e) {
  36.       e.printStackTrace();
  37.     }
  38.   }
  39.   //Component initialization
  40.   private void jbInit() throws Exception  {
  41.     //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
  42.     contentPane = (JPanel) this.getContentPane();
  43.     titledBorder1 = new TitledBorder("");
  44.     contentPane.setLayout(borderLayout1);
  45.     this.setSize(new Dimension(399, 288));
  46.     this.setTitle("Frame Title");
  47.     jPanel1.setLayout(xYLayout1);
  48.     jLabel1.setFont(new java.awt.Font("Dialog", 0, 23));
  49.     jLabel1.setForeground(Color.green);
  50.     jLabel1.setBorder(titledBorder1);
  51.     jLabel1.setText("                通用高考成绩管理系统");
  52.     jLabel2.setBorder(BorderFactory.createEtchedBorder());
  53.     jLabel3.setText("请选择");
  54.     jLabel4.setBorder(BorderFactory.createEtchedBorder());
  55.     jLabel4.setToolTipText("");
  56.     jRadioButton1.setForeground(Color.red);
  57.     jRadioButton1.setText("理科成绩录入");
  58.     jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
  59.       public void actionPerformed(ActionEvent e) {
  60.         jRadioButton1_actionPerformed(e);
  61.       }
  62.     });
  63.     jRadioButton2.setForeground(Color.red);
  64.     jRadioButton2.setText("理科成绩查询");
  65.     jRadioButton3.setForeground(Color.red);
  66.     jRadioButton3.setText("文科成绩录入");
  67.     jRadioButton4.setForeground(Color.red);
  68.     jRadioButton4.setText("文科成绩查询");
  69.     contentPane.add(jPanel1, BorderLayout.CENTER);
  70.     jPanel1.add(jLabel1,  new XYConstraints(0, 0, 400, 47));
  71.     jPanel1.add(jLabel2,    new XYConstraints(1, 46, 398, 242));
  72.     jPanel1.add(jRadioButton1,   new XYConstraints(50, 130, -1, -1));
  73.     jPanel1.add(jRadioButton2,   new XYConstraints(200, 130, -1, -1));
  74.     jPanel1.add(jRadioButton3,   new XYConstraints(50, 200, -1, -1));
  75.     jPanel1.add(jRadioButton4,    new XYConstraints(200, 200, -1, -1));
  76.     jPanel1.add(jLabel3, new XYConstraints(3, 48, 92, 22));
  77.     jPanel1.add(jLabel4, new XYConstraints(33, 94, 320, 165));
  78.   }
  79.   //Overridden so we can exit when window is closed
  80.   protected void processWindowEvent(WindowEvent e) {
  81.     super.processWindowEvent(e);
  82.     if (e.getID() == WindowEvent.WINDOW_CLOSING) {
  83.       System.exit(0);
  84.     }
  85.   }
  86.   void jRadioButton1_actionPerformed(ActionEvent e) {
  87.   }
  88. }