@SuppressWarnings({"rawtypes", "unchecked"})
  private void ladeTabelle() {
    String test = Reha.thisClass.patpanel.patDaten.get(63);
    if (test.trim().equals("")) {
      JOptionPane.showMessageDialog(
          null, "Mit der Arztliste dieses Patienten läuft etwas schief....");
    } else {
      String[] arztid = test.split("\n");

      for (int i = 0; i < arztid.length; i++) {
        String[] arzt = arztid[i].split("@");
        Vector<Vector<String>> vec =
            SqlInfo.holeFelder(
                "select nachname,vorname,strasse,ort,arztnum,bsnr,id from arzt where id = '"
                    + arzt[1]
                    + "' LIMIT 1");
        if (vec.size() >= 1) {
          Vector vec2 = (Vector) ((Vector) vec.get(0)).clone();
          vec2.insertElementAt(Boolean.valueOf(false), 0);
          atblm.addRow((Vector) vec2.clone());
        }
      }
      if (atblm.getRowCount() > 0) {
        arzttbl.setRowSelectionInterval(0, 0);
      }
      arzttbl.revalidate();
    }
  }
 @SuppressWarnings({"unchecked", "rawtypes"})
 private void doArztAufnehmen() {
   JRtaTextField[] tf = {null, null, null};
   tf[0] = new JRtaTextField("nix", false);
   tf[1] = new JRtaTextField("nix", false);
   tf[2] = new JRtaTextField("nix", false);
   // ArztAuswahl(JXFrame owner, String name,String[] suchegleichnach,JRtaTextField[]
   // elterntf,String arzt) {
   ArztAuswahl awahl =
       new ArztAuswahl(
           null,
           "ArztAuswahl",
           new String[] {"", ""},
           new JRtaTextField[] {tf[0], tf[1], tf[2]},
           "");
   awahl.setModal(true);
   awahl.setLocationRelativeTo(this);
   awahl.setVisible(true);
   // System.out.println(tf[0].getText()+" - "+tf[1].getText()+" - "+tf[2].getText());
   if (!tf[2].getText().trim().equals("")) {
     Vector<Vector<String>> vec =
         SqlInfo.holeFelder(
             "select nachname,vorname,strasse,ort,arztnum,bsnr,id from arzt where id = '"
                 + tf[2].getText()
                 + "' LIMIT 1");
     if (vec.size() > 0) {
       String test = Reha.thisClass.patpanel.patDaten.get(63);
       if (!test.contains("@" + tf[2].getText().trim() + "@")) {
         Vector vec2 = (Vector) ((Vector) vec.get(0)).clone();
         vec2.insertElementAt(true, 0);
         atblm.addRow((Vector) vec2.clone());
         arzttbl.validate();
         String msg =
             "Dieser Arzt ist bislang nicht in der Arztliste dieses Patienten.\n"
                 + "Soll dieser Arzt der Ärzteliste des Patienten zugeordnet werden?";
         int frage =
             JOptionPane.showConfirmDialog(
                 null, msg, "Wichtige Benutzeranfrage", JOptionPane.YES_NO_OPTION);
         if (frage == JOptionPane.YES_OPTION) {
           test = test + "@" + tf[2].getText().trim() + "@\n";
           Reha.thisClass.patpanel.patDaten.set(63, test);
           String cmd =
               "update pat5 set aerzte='"
                   + test
                   + "' where pat_intern='"
                   + Reha.thisClass.patpanel.aktPatID
                   + "' LIMIT 1";
           new ExUndHop().setzeStatement(cmd);
         }
       } else {
         JOptionPane.showMessageDialog(
             null, "Dieser Arzt ist bereits in der Ärzteliste enthalten...");
       }
     }
   }
 }
 private void doUebernahme() {
   Vector<String> vec = new Vector<String>();
   String[] aerzte;
   int rows = atblm.getRowCount();
   for (int i = 0; i < rows; i++) {
     if (atblm.getValueAt(i, 0) == Boolean.TRUE) {
       vec.add((String) atblm.getValueAt(i, 7));
     }
   }
   if (vec.size() > 0) {
     aerzte = new String[vec.size()];
     for (int i = 0; i < vec.size(); i++) {
       aerzte[i] = vec.get(i);
     }
     eltern.aerzte = aerzte.clone();
   } else {
     JOptionPane.showMessageDialog(null, "Na ja, keine Auswahl ist ja auch eine Auswahl....");
     eltern.aerzte = new String[] {};
   }
 }
  private JPanel getForm() {
    try {

      //                                1     2    3    4    5      1       2    3   4  5
      FormLayout lay =
          new FormLayout("0dlu,10dlu,fill:0:grow(1.0),10dlu,0dlu", "10dlu,100dlu,5dlu,p,5dlu");
      PanelBuilder pb = new PanelBuilder(lay);
      pb.getPanel().setOpaque(false);
      CellConstraints cc = new CellConstraints();
      atblm = new MyArztTableModel();
      atblm.setColumnIdentifiers(
          new String[] {"Drucken", "Name", "Vorname", "Strasse", "Ort", "LANR", "BSNR", ""});
      arzttbl = new JXTable(atblm);
      arzttbl.getColumn(0).setMaxWidth(30);
      arzttbl.getColumn(7).setMinWidth(0);
      arzttbl.getColumn(7).setMaxWidth(0);
      arzttbl.validate();
      JScrollPane jscr = JCompTools.getTransparentScrollPane(arzttbl);
      jscr.validate();
      pb.add(jscr, cc.xy(3, 2, CellConstraints.FILL, CellConstraints.DEFAULT));

      FormLayout lay2 =
          new FormLayout(
              "fill:0:grow(0.33),150dlu,fill:0:grow(0.33),150dlu,fill:0:grow(0.33)", "5dlu,p,5dlu");
      PanelBuilder pb2 = new PanelBuilder(lay2);
      pb2.getPanel().setOpaque(false);
      CellConstraints cc2 = new CellConstraints();
      buts[0] = new JButton("Auswahl übernehmen");
      buts[0].setActionCommand("uebernehmen");
      buts[0].addActionListener(this);
      pb2.add(buts[0], cc2.xy(2, 2));

      buts[1] = new JButton("neuen Arzt aufnehmen");
      buts[1].setActionCommand("zusatz");
      buts[1].addActionListener(this);
      pb2.add(buts[1], cc2.xy(4, 2));

      pb2.getPanel().validate();

      pb.add(pb2.getPanel(), cc.xy(3, 4));

      pb.getPanel().validate();

      new SwingWorker<Void, Void>() {
        @Override
        protected Void doInBackground() throws Exception {
          try {
            ladeTabelle();
            Reha.thisClass.progressStarten(false);
          } catch (Exception ex) {
            ex.printStackTrace();
          }
          return null;
        }
      }.execute();

      return pb.getPanel();
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    return null;
  }