Выводит ошибку:
Функция "showInputDialog()" ожидает параметры: "showInputDialog(Component, Object, String, int, Icon, Object[], Object)"
Функция "showInputDialog()" ожидает параметры: "showInputDialog(Component, Object, String, int, Icon, Object[], Object)"
void selectSerialPort()
{
String result = (String) JOptionPane.showInputDialog(this,
"Select the serial port that corresponds to your Arduino board.",
"Select serial port",
JOptionPane.PLAIN_MESSAGE,
null,
Serial.list(),
0);
if (result != null) {
portname = result;
openSerialPort();
}
}