0
我正在制作一个java dektop应用程序,其中需要从物理产品读取一些条形码并在jtextfield中设置。我发现一个引用,但没有代码。使用扫描仪的Swing应用程序条形码阅读器
参考链接:https://youtu.be/AJS_kGRJ_Xg
所以,请建议我为这个更好的解决方案。
感谢提前。 Jitendra马尔维亚 电子邮件ID:[email protected]
我正在制作一个java dektop应用程序,其中需要从物理产品读取一些条形码并在jtextfield中设置。我发现一个引用,但没有代码。使用扫描仪的Swing应用程序条形码阅读器
参考链接:https://youtu.be/AJS_kGRJ_Xg
所以,请建议我为这个更好的解决方案。
感谢提前。 Jitendra马尔维亚 电子邮件ID:[email protected]
条码扫描仪工作的逻辑很简单,(条形码扫描仪问题读取每个条形码值后回车键事件或Tab键事件)
You can read the barcode in jtextfieled .At the End of the barcode value, Barcode scanner will automatilly trigger the enter keyevent or Tab key .
1 .You Can use the key event(enter or tab) to Idenntify the barcode scanning is completed or not.
2. Once you receive the "Enter or TAB key event" .You need to read the value from jtextfield,Using this value you can search the product related to that barcode value.
u能请分享确切的代码相关的?条形码扫描器在扫描后应自动填写文本框, –
您不需要明确编写任何代码以在扫描后自动填充文本框。只需将光标置于jtextfiled中并扫描条形码即可。无限期地,您将获得jtextfiled中的条形码值。 – Assen