2017-01-02 67 views

回答

2

條碼掃描儀工作的邏輯很簡單,(條形碼掃描儀問題讀取每個條形碼值後回車鍵事件或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. 
+0

u能請分享確切的代碼相關的?條形碼掃描器在掃描後應自動填寫文本框, –

+1

您不需要明確編寫任何代碼以在掃描後自動填充文本框。只需將光標置於jtextfiled中並掃描條形碼即可。無限期地,您將獲得jtextfiled中的條形碼值。 – Assen

相關問題