getName() returns the string "//./COM4".
So how do I use getName() in order the port is displayed automatically to the comboBox when I run the Gui and before hitting sendcommand button?
Also the "//./" characters before "COM4" must be discarted.
this gives me the following:
Exception in thread "main" java.lang.NullPointerException
at twowayserialcomm.TwoWaySerialComm.<init>(TwoWaySerialComm.java:191)
at twowayserialcomm.TwoWaySerialComm.main(TwoWaySerialComm.java:48)
2) I have tried the following:
this gives me :
Exception in thread "main" java.lang.NullPointerException
at twowayserialcomm.TwoWaySerialComm.<init>(TwoWaySerialComm.java:197)
at twowayserialcomm.TwoWaySerialComm.main(TwoWaySerialComm.java:50)
Alexandros Stefanidis wrote:1) I have tried the following at line 189:
this gives me the following:
Exception in thread "main" java.lang.NullPointerException
at twowayserialcomm.TwoWaySerialComm.<init>(TwoWaySerialComm.java:191)
at twowayserialcomm.TwoWaySerialComm.main(TwoWaySerialComm.java:48)
Tha variable portInUse is null. Where have you initialized it?
2) I have tried the following:
this gives me :
Exception in thread "main" java.lang.NullPointerException
at twowayserialcomm.TwoWaySerialComm.<init>(TwoWaySerialComm.java:197)
at twowayserialcomm.TwoWaySerialComm.main(TwoWaySerialComm.java:50)
Same thing. portList has not been initialized.
All things are lawful, but not all things are profitable.