|
@@ -28,6 +28,8 @@ public class CaptchaUtil {
|
|
|
g.setFont(new Font("Arial", Font.PLAIN, 20));
|
|
g.setFont(new Font("Arial", Font.PLAIN, 20));
|
|
|
for (int i = 0; i < LENGTH; i++) {
|
|
for (int i = 0; i < LENGTH; i++) {
|
|
|
g.setColor(new Color(new Random().nextInt(255), new Random().nextInt(255), new Random().nextInt(255)));
|
|
g.setColor(new Color(new Random().nextInt(255), new Random().nextInt(255), new Random().nextInt(255)));
|
|
|
|
|
+ System.out.println(captcha);
|
|
|
|
|
+ System.out.println(captcha.charAt(i));
|
|
|
g.drawString(String.valueOf(captcha.charAt(i)), 20 * i + 10, 30);
|
|
g.drawString(String.valueOf(captcha.charAt(i)), 20 * i + 10, 30);
|
|
|
}
|
|
}
|
|
|
|
|
|