private void Beenden(int endewert) { if (endewert == 1) { String[] srueck = { NamePatient.getText(), Rezeptnummer.getText(), BeginnStunde.getText() + ":" + BeginnMinute.getText() + ":00", Dauer.getText(), EndeStunde.getText() + ":" + EndeMinute.getText() + ":00", "" }; Eltern.setWerte(srueck); this.setVisible(false); this.dispose(); } if (endewert == 0) { String[] srueck = {"", "", "", "", "", ""}; Eltern.setWerte(srueck); this.setVisible(false); this.dispose(); } }
public void WerteSetzen(boolean aufName) { String[] werte = Eltern.getWerte(); NamePatient.setText(werte[0]); Rezeptnummer.setText(werte[1]); Dauer.setText(werte[3]); BeginnStunde.setText(werte[2].split(":")[0]); BeginnMinute.setText(werte[2].split(":")[1]); EndeStunde.setText(werte[4].split(":")[0]); EndeMinute.setText(werte[4].split(":")[1]); if (aufName) { NamePatient.requestFocus(); NamePatient.setCaretPosition(0); } }