Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Stimmt out ist null.... :/
Nur wieso? ich habe die Variable ja in der Klasse definiert, bei der Methode connect(die ich aufrufe) wird sie dann gefüllt, was laut debugger auch funktioniert.
Nur in der Methode sendMessage ist sie wieder null....
D.h. jedes Mal wenn du auf den Button klickst wird ein neuer Client erzeugt. Und hier seh ich halt nicht den Connect()-Aufruf. Oder überseh ich da was?beim klicken des Buttons wird die Methode "sendMessage" in der Client Kasse aufgerufen:
Java:private void button_sendMessageActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: Client send = new Client(this.textArea_conversation,this.textField_sendMessage); send.sendMessage(); }
private void menuItem_connectServerActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Client client = new Client(this.textArea_conversation,this.textField_sendMessage);
try {
client.connect();
} catch (IOException ex) {
ex.printStackTrace();
}
}