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

📄 login3.txt

📁 用JAVA编写一个LOGIN的方法(3)
💻 TXT
字号:
			if  (s_kid[2].equals("1")){ 
				add(userName);
				add(userField);
				add(passPhrase);
				add(passPhraseField);
				add(usbKeyId);
				add(usbkeyIDField);
				add(tempLbl);
				add(button);
			}
			else  if(s_kid[2].equals("0")){
			    add(passPhrase);
			    add(passPhraseField);
			    add(usbKeyId);
			    add(usbkeyIDField);
			    add(tempLbl);
			    add(button);
			}
		}
	}
	//private static void newFolder (String folderPath)
	private static void newFolder (String folderPath)
	{
	    
		try {
		    String filePath = folderPath;
		    filePath = filePath.toString();
		    File tempPath = new File("c:\\temp");
		    if (!tempPath.exists())
		    {
		        tempPath.mkdir();
		    }
		    File myFilePath = new File(filePath);
		    if (!myFilePath.exists()) 
		    {
		         myFilePath.mkdir();
		    }
		}
		catch (Exception e) 
		{
		    System.out.println("error");
		    e.printStackTrace();
		}
	}
}

//start window 
class JSplashWindowEx extends JWindow implements Runnable {
    Thread splashThread=null;
    private JProgressBar progress;
    private PropertyReader property = PropertyReader.getInstance();
    public JSplashWindowEx() {
        setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        JPanel splash = new JPanel(new BorderLayout());
        URL url = getClass().getResource("/images/winter.jpg");
        
        if(url != null){
            splash.add(new JButton(new ImageIcon(url)),
                    BorderLayout.CENTER);
            }
        progress = new JProgressBar(1,100);
        progress.setStringPainted(true);
        progress.setBorderPainted(false);
        progress.setString("Please Wait丆The programme is loading...");
        progress.setBackground(Color.blue);
        splash.add(progress,BorderLayout.SOUTH);
        setContentPane(splash);
        
        Dimension screen = getToolkit().getScreenSize();
        pack();
        setLocation((screen.width - getSize().width) / 2,(screen.height - getSize().height) / 2);
    }
    
    public void start(){
        this.toFront();
        splashThread=new Thread(this);
        splashThread.start();
    }
    
    public void run(){
        show();
        int proNum = 0;
        while (proNum < 10) {
            progress.setValue(proNum * 10);
            proNum = property.getproNum();
        }
        try {
            for (int i = 90; i <= 100; i++) {
                Thread.sleep(10);
                progress.setValue(i);
            }
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
        dispose();
        return;
    } 
}

⌨️ 快捷键说明

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