Captcha library for Swing?

做~自己de王妃 提交于 2019-12-22 08:27:53

问题


I'm looking for a captcha library or component that I could use inside a Swing Gui. Do you know any ?

Edit: It seems not to exist. I'll program a small one myself.


回答1:


Even though I don't really understand the need for captcha in Swing app, you can probably use JCaptcha http://jcaptcha.sourceforge.net/




回答2:


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...



来源:https://stackoverflow.com/questions/6219029/captcha-library-for-swing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!