I'm reading data from serial port inside while loop as follows:
while((len = this.getIn().read(buffer)) > 0) {
data = new String(buffer, 0, len);
System.out.println("data len " + len);
handleModemresponse(data);
}
but, while reading the data from stream starts, the main AWT window, which has a disconnect button, is not getting any listeners (whole window not getting listeners). It only listens when transfer completes, i.e., outside while loop.
I want my AWT window to listen for my actions when it is in the while loop also.
Any ideas how I can achieve this?