Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java³¬¼òµ¥,³¬¼¶ÊµÓÃÑéÖ¤Âë

1.   ÑéÖ¤Âë(2)
dsnaValidateCode.jar
dsnaValidateCode_src.rar
ValidateCode.java ÑéÖ¤ÂëÉú³ÉÀà
Java´úÂë
package cn.dsna.util.images;   
  
import java.awt.Color;   
import java.awt.Font;   
import java.awt.Graphics2D;   
import java.awt.image.BufferedImage;   
import java.io.FileOutputStream;   
import java.io.IOException;   
import java.io.OutputStream;   
import java.util.Random;   
  
import javax.imageio.ImageIO;   
/**  
 * ÑéÖ¤ÂëÉú³ÉÆ÷  
 * @author dsna  
 *  
 */  
public class ValidateCode {   
    // Í¼Æ¬µÄ¿í¶È¡£   
    private int width = 160;   
    // Í¼Æ¬µÄ¸ß¶È¡£   
    private int height = 40;   
    // ÑéÖ¤Âë×Ö·û¸öÊý   
    private int codeCount = 5;   
    // ÑéÖ¤Âë¸ÉÈÅÏßÊý   
    private int lineCount = 150;   
    // ÑéÖ¤Âë   
    private String code = null;   
    // ÑéÖ¤ÂëͼƬBuffer   
    private BufferedImage buffImg=null;   
    private char[] codeSequence = { 'A','B','C','D','E','F','G', 'H','I','J','K','L','M','N','P','Q','R','S','T','U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9'};   
    public  ValidateCode() {   
   &n


Ïà¹ØÎĵµ£º

ÉîÈëÀí½âJavaµÄÄÚÊ¡Óë·´Éä

ºÜ¶àÅóÓÑÔÚÉîÈëµÄ½Ó´¥JavaÓïÑÔºó¾Í»á·¢ÏÖÕâÑùÁ½¸ö´Ê£º·´ÉäºÍÄÚÊ¡£¬Ö®Ç°ÎÒÃÇÒѾ­Í¨¹ýʵÀý½âÎöÁËJavaµÄ·´Éä»úÖÆ£¬ÔÚʲô³¡ºÏÏÂÓ¦ÓÃÒÔ¼°ÈçºÎʹÓ㿽ñÌì°ÑÕâ¶þÕß·ÅÔÚÒ»Æð½éÉÜ£¬ÒòΪËüÃǶþÕßÊÇÏศÏà³ÉµÄ¡£
·´Éä
Ïà¶Ô¶øÑÔ£¬·´Éä±ÈÄÚÊ¡¸üÈÝÒ×Àí½âÒ»µã¡£ÓÃÒ»¾ä±È½Ï°×µÄ»°À´¸ÅÀ¨£¬·´Éä¾ÍÊÇÈÃÄã¿ÉÒÔͨ¹ýÃû³ÆÀ´µÃµ½¶ÔÏó(À࣬ÊôÐÔ£ ......

Java »ù±¾½éÉÜ


Java
Java£¬ÊÇÓÉSun Microsystems¹«Ë¾ÓÚ1995Äê5ÔÂÍÆ³öµÄJava³ÌÐòÉè¼ÆÓïÑÔºÍJavaƽ̨µÄ×ܳơ£ÓÃJavaʵÏÖµÄHotJavaä¯ÀÀÆ÷£¨Ö§³ÖJava applet£©ÏÔʾÁËJavaµÄ÷ÈÁ¦£º¿çƽ̨¡¢¶¯Ì¬µÄWeb¡¢Internet¼ÆËã¡£´Ó´Ë£¬Java±»¹ã·º½ÓÊܲ¢Íƶ¯ÁËWebµÄѸËÙ·¢Õ¹£¬³£ÓõÄä¯ÀÀÆ÷ÏÖÔÚ¾ùÖ§³ÖJava applet¡£
¡¡¡¡Javaƽ̨ÓÉJavaÐéÄâ»ú£¨Java Virt ......

JavaÖеķ´Éä»úÖÆ

·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆÑ§ÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊÇ»ùÓÚ·´Éä»úÖÆµÄÓïÑÔ¡£×î½ü ......

JAVA³£ÓòÙ×÷Óï¾ä ¸öÈË×ܽá

·if ((ICO2 = getInitParameter("ICO2")) == null)
      ICO2 = "images/commend.gif";
·ActionContext ctx = ActionContext.getContext();
  HttpServletRequest request = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ