if (ApplejuiceFassade.getInstance().getInformation(). getVerbindungsStatus() == Information.VERBUNDEN) { int result = JOptionPane.showConfirmDialog(AppleJuiceDialog. getApp(), warnungNachricht, warnungTitel, JOptionPane.YES_NO_OPTION); if (result != JOptionPane.YES_OPTION) { return;
ApplejuiceFassade af = ApplejuiceFassade.getInstance(); if (af.getInformation().getVerbindungsStatus() == Information.VERBUNDEN) { NetworkInfo netInfo = af.getNetworkInfo(); long timestamp = af.getLastCoreTimestamp(); if (timestamp == 0){  timestamp = System.currentTimeMillis(); } long timeDiff = timestamp - netInfo.getConnectionTime(); int minuten = (int) (timeDiff / 60000); if (minuten < 0 ){ minuten = 0; } if (minuten <= 30){ String tmp = warnungNachricht.replaceAll("%s", Integer.toString(minuten)); int result = JOptionPane.showConfirmDialog( AppleJuiceDialog. getApp(), tmp, warnungTitel, JOptionPane.YES_NO_OPTION); if (result != JOptionPane.YES_OPTION) { return; }
            public void actionPerformed(ActionEvent ae) {                int selected = serverTable.getSelectedRow();                ServerDO server = (ServerDO) ( (ServerTableModel) serverTable.                                              getModel()).                    getRow(selected);                if (ApplejuiceFassade.getInstance().getInformation().                    getVerbindungsStatus() == Information.VERBUNDEN) {                    int result = JOptionPane.showConfirmDialog(AppleJuiceDialog.                        getApp(), warnungNachricht, warnungTitel,                        JOptionPane.YES_NO_OPTION);                    if (result != JOptionPane.YES_OPTION) {                        return;                    }                }                ApplejuiceFassade.getInstance().connectToServer(server.                    getID());                SoundPlayer.getInstance().playSound(SoundPlayer.VERBINDEN);            }