gpt4 book ai didi

java - Swing 应用程序使用扫描仪的条码阅读器

转载 作者:行者123 更新时间:2023-12-02 03:08:22 36 4
gpt4 key购买 nike

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

引用链接为: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.

关于java - Swing 应用程序使用扫描仪的条码阅读器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41425483/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com