使用扫描仪的 Swing 应用程序条形码 reader

Swing Application Barcode reader using Scanner

我正在制作一个 java dektop 应用程序,我需要从物理产品中读取一些条形码并在 jtextfield 中设置。 我找到了一份参考资料,但没有找到代码。

引用 link 是:https://youtu.be/AJS_kGRJ_Xg

所以请为此建议我更好的解决方案。

提前致谢。 吉腾德拉马尔维亚 电子邮件 ID:jitendramalviya39@gmail.com

条码扫描器工作逻辑非常简单(条码扫描器读取每个条码值后发出Enter键事件或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.