java - Reading alt code JTextArea -


i have barcode reads : "serialnumberalt09productnumber" alt09 = tab.

i read number in jtextarea, if write number manually tab key on keyboard valid input can text.trim().split("\t"); valid input respective serial number , product number. when reading barcode sends alt09 not read anything.

how jtextarea accept alt09 tab (or alternative split on location).

jtextarea not getting tab @ all. tab interrupted whole gui interface switch next editable field. of course can bend rule, intercept tab on parent container , force send child jtextarea , can write won method keypressed event , insert tab character text it's approach because changes user experience. user expects tab go next field particular text area should delimiter text? reason - tab similar space - in user experience it's not clear input right or not.

to avoid these troubles why not take simple approach:

serialnumber=productnumber 

it clear, visible, predictable, understandable , off - doesn't required question ;)


Comments