Getting input from barcode scanner internally without textbox

前端 未结 3 1960
时光说笑
时光说笑 2020-12-13 11:17

I have a barcode scanner and in my java application I have to bring a popup to display all the information associated with the barcode from database when the product is scan

3条回答
  •  失恋的感觉
    2020-12-13 11:59

    In some way similar to @Cyrusmith solution I have created a 'proof of concept' solution (with several limitations right now, but you are invited to fix them :) ) trying to solve the limitations on the previous solutions in this post:

    • It support barcode readers that doesn't send the ENTER at the end of barcode string.
    • If the focus is currently on a swing text component and barcode is captured, the barcode doesn't get to the text component and only to the barcode listener.

    See https://stackoverflow.com/a/22084579/320594

提交回复
热议问题