.setIconImage(Toolkit .getDefaultToolkit() .getImage( getClass() .getResource( "/de/moonflower/jfritz/resources/images/trayicon.png")));   int x = Integer.parseInt(Main.getProperty("position.left", "10")); int y = Integer.parseInt(Main.getProperty("position.top", "10")); int w = Integer.parseInt(Main.getProperty("position.width", "640")); int h = Integer.parseInt(Main.getProperty("position.height", "400"));  int windowState = Integer.parseInt(Main.getProperty("window.state", Integer.toString(Frame.NORMAL))); setLocation(x, y); setSize(w, h); setExtendedState(windowState);
.setIconImage(Toolkit .getDefaultToolkit() .getImage( getClass() .getResource( "/de/moonflower/jfritz/resources/images/trayicon.png")));
	private void createGUI() throws WrongPasswordException {		setTitle(Main.PROGRAM_NAME);		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);		// we want to react on closing		///////////////////////////////  test code		/*		 setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);		 WindowAdapter wl = new WindowAdapter() {		 public void windowClosing(WindowEvent evt) {		 Debug.msg("adsasdfasdfsadffasdfasdf");		 }		 };		 addWindowListener(wl);		 */////////////////////////////////////////////		setDefaultLookAndFeel();		ShutdownThread shutdownThread = new ShutdownThread();		Runtime.getRuntime().addShutdownHook(shutdownThread);		addKeyListener(KeyEvent.VK_F5, "F5"); //$NON-NLS-1$		this		.setIconImage(Toolkit				.getDefaultToolkit()				.getImage(						getClass()						.getResource(								"/de/moonflower/jfritz/resources/images/trayicon.png"))); //$NON-NLS-1$		// Setting size and position		int x = Integer.parseInt(Main.getProperty("position.left", "10")); //$NON-NLS-1$,  //$NON-NLS-2$		int y = Integer.parseInt(Main.getProperty("position.top", "10")); //$NON-NLS-1$,  //$NON-NLS-2$		int w = Integer.parseInt(Main.getProperty("position.width", "640")); //$NON-NLS-1$,  //$NON-NLS-2$		int h = Integer.parseInt(Main.getProperty("position.height", "400")); //$NON-NLS-1$,  //$NON-NLS-2$		int windowState = Integer.parseInt(Main.getProperty("window.state",				Integer.toString(Frame.NORMAL)));		setLocation(x, y);		setSize(w, h);		setExtendedState(windowState);		callerListPanel = new CallerListPanel(JFritz.getCallerList(), this);		phoneBookPanel = new PhoneBookPanel(JFritz.getPhonebook(), this,Main.SAVE_DIR, new Locale(Main.getProperty("locale", "de_DE")));		quickDialPanel = new QuickDialPanel();		//New code here, remove if problematic		monitoringPanel = new MonitoringPanel();		tabber = new JTabbedPane(SwingConstants.BOTTOM);		tabber.addTab(Main.getMessage("callerlist"), callerListPanel); //$NON-NLS-1$		tabber.addTab(Main.getMessage("phonebook"), phoneBookPanel); //$NON-NLS-1$		tabber.addTab(Main.getMessage("quickdials"), quickDialPanel); //$NON-NLS-1$		tabber.addTab(Main.getMessage("monitoring"), monitoringPanel);		tabber.addChangeListener(new ChangeListener() {			public void stateChanged(ChangeEvent e) {				if (tabber.getTitleAt(tabber.getSelectedIndex()).equals(						Main.getMessage("callerlist"))) { //$NON-NLS-1$					setStatus();				} else if (tabber.getTitleAt(tabber.getSelectedIndex()).equals(						Main.getMessage("phonebook"))) { //$NON-NLS-1$					phoneBookPanel.setStatus();				} else if (tabber.getTitleAt(tabber.getSelectedIndex()).equals(						Main.getMessage("quickdials"))) { //$NON-NLS-1$					quickDialPanel.setStatus();				} else if (tabber.getTitleAt(tabber.getSelectedIndex()).equals(						Main.getMessage("monitoring"))) {					monitoringPanel.setStatus();				}			}		});		// Adding gui components		setJMenuBar(createMenu());				getContentPane().setLayout(new BorderLayout());		getContentPane().add(createMainToolBar(), BorderLayout.NORTH);		getContentPane().add(tabber, BorderLayout.CENTER);		getContentPane().add(createStatusBar(), BorderLayout.SOUTH);		pack();		JFritz.getCallerList().fireTableDataChanged();		JFritz.getCallerList().fireTableStructureChanged();		String ask = Main.getProperty("jfritz.password", Encryption //$NON-NLS-1$				.encrypt(JFritz.PROGRAM_SECRET + "")); //$NON-NLS-1$		String pass = JFritz.getFritzBox().getPassword();		if (!Encryption.decrypt(ask).equals(JFritz.PROGRAM_SECRET + pass)) {			String password = showPasswordDialog(""); //$NON-NLS-1$			if (password == null) { // PasswordDialog canceled				Debug.errDlg(Main.getMessage("input_canceled")); //$NON-NLS-1$				Debug.err("Eingabe abgebrochen"); //$NON-NLS-1$				throw new WrongPasswordException();			} else if (!password.equals(pass)) {				Debug.errDlg(Main.getMessage("wrong_password")); //$NON-NLS-1$				Debug.err(Main.getMessage("wrong_password")); //$NON-NLS-1$				throw new WrongPasswordException();			}		}	}