(强烈推荐)基于Java的在线考试系统设计与实现_毕业论文设计 - 百度文库 ر

txtļݣڴ洢ά 3.Myeclipse

MyEclipseһʮڿJava, J2EEEclipseϣMyEclipseĹܷdzǿ֧Ҳʮֹ㷺ǶԸֿԴƷ֧ʮֲ

MyEclipseҵƽ̨MyEclipse Enterprise Workbench MyEclipseǶEclipseIDEչǿݿJavaEEĿԼӦóϷ漫߹ЧʡǹܷḻJavaEEɿ걸ı롢ԡ

֧

HTML,Struts,JSP,CSS,Javascript,Spring,SQL,Hibernate

MyEclipse һʮڿJava, J2EE Eclipse ϣMyEclipseĹܷdzǿ֧Ҳʮֹ㷺ǶԸֿԴƷ֧ʮֲMyEclipseĿǰ֧Java Servlet,AJAX, JSP, JSF, Struts,Spring, Hibernate,EJB3,JDBCݿӹߵȶܡ˵MyEclipseĿǰԴƷרeclipseߡ

ݹٷϢMyEclipse 2013ѾʽMyEclipse 2013֧HTML5JQueryJavascript ⡣MyEclipse 2013֧Html5ƵƵAPIԪصĿӶΪƶ豸ӵWebӦóͨHTML5 ӻŵû档ͬʱMyEclipse 2013֧JQueryͨܣӶЧС

19

4.2 ¼ģʵ

û¼LoginFrame.javaҳʵ֣ĴʵļUser.Javaʵ࣬Լķʵɡû¼Ӧóڣûֻͨڲܽϵͳ¼ʱϵͳԶжݡ

û¼ʹTextBoxؼΪûûƺ룬û¼ťԵ¼ϵͳȡťȡ

˴¼룬ѡԼļ𣬵¼ܽϵͳֵעǣ˴ûעṦܣΪѧУĽʦѧϢͨϵͳԱ¼ģЧıظ¼Ͷעᡣ

û¼ť¼Login_Click(),¼ʵû¼̡֤¼Login_Click()֤û룬ûȷģûԵ¼ϵͳУҳ浯ʾϢûǷڵȴϢԶķʽʾû

нͼ4-3ʾ

ͼ4-3¼

ʵִ£

package com.tarena.elts.ui;

20

import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; import java.awt.Point;

import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.Timer; import java.util.TimerTask; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel;

import javax.swing.JPasswordField; import javax.swing.JTextField;

import javax.swing.border.EmptyBorder; **

* ¼

* ڹ߲ʹawtʹswing * *

public class LoginFrame extends JFrame{ private JTextField idField;

private JPasswordField passwordField;

21

private JLabel message;ʾϢ

private ClientContext clientContext;

public void setClientContext(ClientContext clientContext){ }

public LoginFrame(){ } **

* ʼ *

private void init(){

this.setContentPane(createContentPane());setContentPaneã

ôڱ

this.setTitle(\¼ϵͳ\ôڴС ھ

this.setLocationRelativeTo(null); 򴰿 init();ʼ

this.clientContext = clientContext;

panelڶ

ôĬϵĹرշʽ,ĬµڵĹرհť

22