switch (e.getActionCommand()) {
case "connect": {
if (serial == null) {
con.setText("Disconnect");
output.setText("");
serial = new SerialDAO(portb.getSelectedItem().toString(),
SerialPort.BAUDRATE_9600, SerialPort.DATABITS_8,
SerialPort.STOPBITS_1, SerialPort.PARITY_NONE, this);
serial.startReading();
setInfoText("Started reading " + serial.getPortName());
} else if (serial != null) {