jfritz.getJframe().setStatus("Verbinde mit Telnet ...");
if (jfritz.getJframe() != null) { jfritz.getJframe().setStatus("Verbinde mit Telnet ..."); }
	public void connect() {		boolean isdone = false;		int connectionFailures = 0;		while (!isdone) {			String server = JFritz.getProperty("box.address");			String user = JFritz.getProperty("telnet.user", "");			String password;			if (JFritz.getProperty("telnet.password", "").equals("")) {				password = "";			} else {				password = Encryption.decrypt(JFritz						.getProperty("telnet.password"));			}			int port = 23;			try {				jfritz.getJframe().setStatus("Verbinde mit Telnet ...");				telnet.connect(server, port); // Connect to the specified server				in = telnet.getInputStream();				out = new PrintStream(telnet.getOutputStream());				login(user, password);				connected = true;				isdone = true;				Debug.msg("Done");			} catch (ConnectException e) { // Connection Timeout				Debug.msg("Telnet connection timeout ...");				// Warten, falls wir von einem Standby aufwachen,				// oder das Netzwerk temporr nicht erreichbar ist.				if (connectionFailures < 5) {					Debug.msg("Waiting for FritzBox, retrying ...");					connectionFailures++;				} else {					Debug.msg("FritzBox not found. Get new IP ...");					jfritz.getJframe().setStatus(							JFritz.getMessage("box_not_found"));					String box_address = jfritz.getJframe().showAddressDialog(							JFritz.getProperty("box.address", "fritz.box"));					if (!box_address.equals("")) {						Debug.msg("New IP for FritzBox: " + box_address);						JFritz.setProperty("box.address", box_address);					}				}			} catch (Exception e) {				e.printStackTrace();			}		}	}