|
|
@@ -25,7 +25,7 @@ public class CaptchaUtil {
|
|
|
g.drawRect(0, 0, WIDTH - 1, HEIGHT - 1);
|
|
|
|
|
|
String captcha = generateRandomString();
|
|
|
-// g.setFont(new Font("Arial", Font.PLAIN, 20));
|
|
|
+ g.setFont(new Font("Arial", Font.PLAIN, 20));
|
|
|
for (int i = 0; i < LENGTH; i++) {
|
|
|
g.setColor(new Color(new Random().nextInt(255), new Random().nextInt(255), new Random().nextInt(255)));
|
|
|
g.drawString(String.valueOf(captcha.charAt(i)), 20 * i + 10, 30);
|