I have uploaded a Netbeans project to Maven on a PC running Windows 8.1.
When executed, the graphic interface is output correctly, the buttons work correctly but the JLabelResult
in one pc is updated correctly and in another not.
The line receives information by Serial from an arduino.
Yes the information you receive is println("texto");
works, but if you have to show a println(float);
in one pc it comes out correctly but in the other it appears in one of the loops, in another it appears in bad format, in another it does not appear .
Any idea if there is any option that comes configured by default in Windows 10?
The first photo should show Cycles done :
But it does not appear while in the second (PC with Windows 10) if it appears:
Reading the serial.
public Window() {
initComponents();
try {
ino.arduinoRXTX("COM3", 9600, listener);
} catch (ArduinoException ex) {
Logger.getLogger(Window.class.getName()).log(Level.SEVERE, null, ex); }
}
Float reading:
SerialPortEventListener listener = new SerialPortEventListener() {
@Override
public void serialEvent(SerialPortEvent spe) {
try {
if (ino.isMessageAvailable()) {
//System.out.println(ino.printMessage());
jLabelResult.setText(ino.printMessage());
}
} catch (SerialPortException ex) {
Logger.getLogger(Window.class.getName()).log(Level.SEVERE, null, ex);
} catch (ArduinoException ex) {
Logger.getLogger(Window.class.getName()).log(Level.SEVERE, null, ex);
}
}
};