登录
首页 » java » java版验证码(数字字母大小写字体字号颜色均任意变化)

java版验证码(数字字母大小写字体字号颜色均任意变化)

于 2022-03-03 发布 文件大小:1.57 kB
0 135
下载积分: 2 下载次数: 1

代码说明:

import java.awt.BasicStroke; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import java.util.Random; import javax.imageio.ImageIO; public class VerifyCode { private int w = 70; private int h = 35; private Random r = new Random(); // {"宋体", "华文楷体", "黑体", "华文新魏", "华文隶书", "微软雅黑", "楷体_GB2312"} private String[] fontNames = {"宋体", "华文楷体", "黑体", "微软雅黑", "楷体_GB2312"};//可选字体 private String codes = "23456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ";//可选字符 private Color bgColor = new Color(255, 255, 255);//背景颜色 private String text ;//验证码上的字符 //生成随机的颜色 private Color randomColor () { int red = r.nextInt(150); int green = r.nextInt(150); int blue = r.nextInt(150); return new Color(red, green, blue); } //生成随机的字体 private Font randomFont () { int index = r.nextInt(fontNames.length); Stri

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 文本聚类
    kmeans文本聚类完整实现,通过tfidf计算特征值 奥运 拳击 入场券 基本 分罄 邹市明 夺冠 对手 浮出 水面 股民 要 清楚 自己 的 目的 印花税 之 股民 四季 杭州 股民 放 鞭炮 庆祝 印花税 下调  残疾 女 青年 入围 奥运 游泳 比赛 创 奥运 历史 两 项 第一 介绍 一 个 ASP.net MVC 系列 教程 在 asp.net 中 实现 观察者 模式 ,或 有 更 好 的 方法 (续) 输 大钱 的 股民 给 我们 启迪 Asp.Net 页面 执行 流程 分析 运动员 行李 将 “后 上 先 下” 奥运 相关 人员 行李 实名制 asp.net 控件 开发 显示 控件 内容 奥运 票务 网上 成功 订票 后 应 及时 到 银行 代售 网点 付款 某 心理 健康 站 开张 后 首 个 咨询 者 是 位 新 股民 ASP.NET 自定义 控件 复杂 属性 声明 持久性 浅析
    2022-04-28 08:40:44下载
    积分:1
  • JSF Examples of online examination system, including source code for online exam...
    jsf在线考试系统的实例,其中包括源代码 jsf在线考试系统的实例,其中包括源代码 jsf在线考试系统的实例,其中包括源代码-JSF Examples of online examination system, including source code for online examination system JSF examples, including source code for online examination system JSF examples, including source code
    2022-01-27 18:19:06下载
    积分:1
  • FishCatch_10_src
    说明:  随着手机的日益普及、Java功能在移动设备上的实现,Java应用程序产生的手机增值服务逐渐体现出其影响力,对丰富人们的生活内容、提供快捷的资讯起着不可忽视的作用。(With the growing popularity of mobile phones, Java-enabled mobile devices in the realization of Java applications of mobile value-added services gradually reflect their influence to enrich people's lives, providing easier access to information plays an essential role.)
    2005-09-05 22:41:03下载
    积分:1
  • urljjgj_v1.0
    通过本工具可以将URL快速转换为迅雷、快车、旋风等专用下载链接(Through this tool can be quickly converted to a URL Thunder, Express, cyclones and other special download link)
    2015-04-20 17:25:37下载
    积分:1
  • SpringMVC+Mybatis等主流框架
    采用SpringMVC+Mybatis等主流框架 支持数据库: Mysql,Oracle10g 前端:使用Jquery和Easyui技术.JS封装简洁,操作简单. 权限:对菜单,按钮控制.根据登陆用户权限展示拥有的菜单和按钮. 拦截:对所有无权限URL进行拦截,防止手动发送HTTP请求,确保系统全性
    2022-05-19 21:26:51下载
    积分:1
  • 123
    智能农场,实现室内温度湿度的显示
    2022-10-03 12:20:04下载
    积分:1
  • Android-music-player-source
    安卓音乐播放器源码,附带详细word文档说明。(Android music player source, with a detailed documentation.)
    2013-08-05 20:50:01下载
    积分:1
  • javascipt特效源码及其示例。可直接COPY使用,非常方便
    javascipt特效源码及其示例。可直接COPY使用,非常方便-javascipt effects and sample source code.
    2023-01-20 06:10:04下载
    积分:1
  • CalendarView-master2
    it is for android calendar
    2013-09-02 20:12:57下载
    积分:1
  • DIV-CSS
    div+css的详细介绍,如何实际在java中应用(div+ css detailed description of how the java application)
    2013-10-19 16:23:50下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载