StringBuffer temp = new StringBuffer(label9Text); int pos = temp.indexOf("%s"); temp.replace(pos, pos + 2, status[1]); pos = temp.indexOf("%d"); temp.replace(pos, pos + 2, Integer.toString(ApplejuiceFassade.getInstance(). getAllServer(). size())); label9.setText(temp.toString());
String temp = label9Text; temp = temp.replaceFirst("%s", status[1]); temp = temp.replaceFirst("%d", Integer.toString(ApplejuiceFassade.getInstance(). getAllServer(). size())); label9.setText(temp);
    public void fireContentChanged(int type, Object content) {        try{            if (type == DataUpdateListener.NETINFO_CHANGED)            {                netInfo = (NetworkInfo) content;                StringBuffer temp = new StringBuffer(label6Text);                int pos = temp.indexOf("%d");                temp.replace(pos, pos + 2, netInfo.getAJUserGesamtAsStringWithPoints());                pos = temp.indexOf("%d");                temp.replace(pos, pos + 2, netInfo.getAJAnzahlDateienAsStringWithPoints());                pos = temp.indexOf("%s");                temp.replace(pos, pos + 2, netInfo.getAJGesamtShareWithPoints(0));                label6.setText(temp.toString());                if (netInfo.isFirewalled())                {                    label7.setText(firewallWarning);                }                else                {                    label7.setText("");                }            }            else if (type == DataUpdateListener.STATUSBAR_CHANGED)            {                String[] status = (String[]) content;                StringBuffer temp = new StringBuffer(label9Text);                int pos = temp.indexOf("%s");                temp.replace(pos, pos + 2, status[1]);                pos = temp.indexOf("%d");                temp.replace(pos, pos + 2, Integer.toString(ApplejuiceFassade.getInstance().                                                            getAllServer().                                                            size()));                label9.setText(temp.toString());            }        }        catch (Exception e)        {            if (logger.isEnabledFor(Level.ERROR))                logger.error("Unbehandelte Exception", e);        }    }