Captcha library for Swing?
I'm looking for a captcha library or component that I could use inside a Swing Gui. Do you k开发者_StackOverflownow any ?
Edit: It seems not to exist. I'll program a small one myself.
Let me try to explain the reason @eugener tries to talk you out of a CAPTCHA: Normally a CAPTCHA is used to prevents bot registration as you already said. This is done by having the server post a problem, that the client/user has to solve. Since you are looking for a Swing lib it sounds like you want the client to pose the problem to the user.
In this case, you still need to transfer the result to the server and that request can still be forged by a bot. On the other hand, if you want the server to pose the problem for the CAPTCHA, you don't need a special lib on the client side. A simple JLabel
to show the image with the problem and a JTextField
for the answer will be enough.
Sorry for not posting this in a comment, but it has too many characters...
Even though I don't really understand the need for captcha in Swing app, you can probably use JCaptcha http://jcaptcha.sourceforge.net/
精彩评论