⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.java

📁 jsp网络考试系统,网上学生考试系统(cs版) 这是毕业设计程序,当时做的时候付出了很大的努力, 也学到很多的东西,算是对所学JAVA知识的一个综合应用吧, 做的过程中在网上找到了很多有用的东西
💻 JAVA
字号:
package tserver;

/*
 * 创建日期 2006-6-5
 * 作者: 褚廷军
 * 项目名称:学生考试系统;
 * 项目要求:毕业设计;
 * 模块名称:客户端欢迎界面
 */

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class Server extends JWindow implements ActionListener
{
  JLabel label;
  Icon icon;
  Timer timer1,timer2;
  JProgressBar progress;
  int i=0,n=0,j=0;
  String s="欢迎使用网络考试系统";
  public Server()
  {
    icon=new ImageIcon("welcome.jpg");
    label=new JLabel("",icon,JLabel.CENTER);
    label.setFont(new Font("隶书",Font.BOLD,86));
   
    label.setHorizontalTextPosition(JLabel.CENTER);
    label.setVerticalTextPosition(JLabel.CENTER);
    timer1=new Timer(20,this);
    timer2=new Timer(130,this);
    progress = new JProgressBar(1,150);
    progress.setStringPainted(true);
    progress.setBorderPainted(false);
    progress.setFont(new Font("隶书",Font.BOLD,36));
    progress.setString("考试系统正在加载,请稍后...");
    progress.setBackground(Color.white);
    timer1.start();
    timer2.start();
    Container con=getContentPane();
    con.add(label,BorderLayout.CENTER);
    con.add(progress,BorderLayout.SOUTH);
    
    setBounds(0,0,1025,745);
    
 
    setVisible(true);
    validate();
  }
  
  public void actionPerformed(ActionEvent e)
  {
  	if(e.getSource()==timer1)
    {
  	 i=i+1;
  	 j=(j+2)%360;
     Color color=new Color((3*i)%255,(7*i)%255,(11*i)%255);
     label.setForeground(color);
  	 progress.setValue(progress.getValue() + 1);
  	 if(i>=150)
  	 {   
  		JFrame.setDefaultLookAndFeelDecorated(true);
        new ServerGui();
  	    this.dispose();
  		timer1.stop();
  		timer2.stop();
  	 }
    }
    if(e.getSource()==timer2)
    {
   	 if(n<12)
   	 {
     	label.setText(s.substring(0,n));
   		if(n==10)
   		 n=0;
   	 }
   	 n++;
    }
  }//
  
  public static void main(String args[])
  {  
    	new Server();
       
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -