I have a jPanel (that contains amoungst other things a jScrollPane and JTable). I'm trying to get input from a barcode reader to display in the table.
Since this GUI will run on a touch screen I don't want to have to forch the use to set the focus on the table or any sort of textfield. I just want them to be able to scan an item with the barcode scanner and trap the data (the barcode scanner can be thought of as just a keyboard).
Is there a way of attaching a keyListener to the jPanel so that it can accept keyboad input? I can make the table and scrollpane non focusable then (I don;t really want the use being able to input directly in then anyhow)
Thanks in advance.
Since this GUI will run on a touch screen I don't want to have to forch the use to set the focus on the table or any sort of textfield. I just want them to be able to scan an item with the barcode scanner and trap the data (the barcode scanner can be thought of as just a keyboard).
Is there a way of attaching a keyListener to the jPanel so that it can accept keyboad input? I can make the table and scrollpane non focusable then (I don;t really want the use being able to input directly in then anyhow)
Thanks in advance.