# Kein Header in JTable !



## KS (25. Mai 2005)

Hallo

Ich suche jetzt bereits 2 Stunden nach Lösungen im FAQ und im Forum überhaupt... Ich find keine Lösung mehr für mein Problem.

Wie folgt habe ich mir eine Klasse gebastelt, welche mir eine DefaultTableModel aus der DB erstellt: 


```
public class DefTabModel {
  public DefTabModel() {
    try {
      jbInit();
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  public static DefaultTableModel getDefTabModel (ResultSet rs) {

    ResultSetMetaData rsmd = null;
    DefaultTableModel dtmTable = null;

    try {
      rsmd = rs.getMetaData();
      int noColumns = rsmd.getColumnCount();
      String[] aColumns = new String[noColumns];
      for (int i = 0; i < noColumns; i++) {
        aColumns[i] = rsmd.getColumnName(i+1);
      }
      dtmTable = new DefaultTableModel(aColumns,0);
      String[] obj = new String[noColumns];
      while (rs.next()) {
        for (int i = 0; i < noColumns; i++) {
          obj[i] = rs.getString(i+1);
        }
        dtmTable.addRow(obj);
        dtmTable.fireTableDataChanged();
      }

    }
    catch (SQLException ex) {
    }

    return dtmTable;
  }

  private void jbInit() throws Exception {
  }
}
```

Diese Klasse gibt mir ein DefaultTableModel zurück, welches ich in der GUI Klasse dann der JTable zufüge. Schön. Die Daten werden angezeigt, jedoch die Header (aColumns) nicht. WARUM?


----------



## Sky (25. Mai 2005)

Pack die Table in ein JScrollPane !


----------



## KS (25. Mai 2005)

etwa so:


```
JTable jTable_personal;
  JScrollPane scrollPane1 = new JScrollPane(jTable_personal);
```

das habe ich bereits gemacht. Geht nicht.


----------



## Wildcard (25. Mai 2005)

kam vor ein paar minuten schonmal:
http://www.java-forum.org/de/viewtopic.php?t=18494


----------



## KS (25. Mai 2005)

OK! Danke für den Hinweis..

Ich habe dies nun so gemacht. 


```
Personal.add(jTable_personal);
Personal.add(scrollPane1 = new JScrollPane(jTable_personal));
```

1. wird so die table und die scrollpane auf das gui gesetzt?
2. Nach der Änderung habe ich nun weder tabelle noch eine Scrollbar..


----------



## Gast (25. Mai 2005)

ansonsten 

```
JScrollPane scrollPane1 = new JScrollPane();
scrollPane1.setViewPortView(new Jtable());
```


----------



## Wildcard (25. Mai 2005)

Ist Personal ein Panel? Variablen werden klein geschrieben!
Hängt von deinem LayoutManager ab. Kann z.B sein das die ScrollPane keine Größe hat.
Ohne deinen Code zu kennen kann ich dazu nichts sagen.
Schöner ist übrigens so:

```
Personal.add(new JScrollPane(jTable_personal));
```


----------



## KS (25. Mai 2005)

Es ist ein JTabbedPane welches auf einem ContentPane liegt. Das mit den Variablen hast Du recht, ist nicht mein Programm. Ich muss es zum laufen bringen. 

Den Code kannst du haben... aber halt dich fest:


```
public class Frame1 extends JFrame {
  //Main UI panel
  JPanel contentPane;

  //Tabbed pane and layouts for pane 1 and pane 2
  //Pane 3 uses a null layout
  FlowLayout flowLayout1_panel1 = new FlowLayout();
  FlowLayout flowLayout1_panel2 = new FlowLayout();

  //Radio buttons on pane 1; buttons are in a
  //mutually exclusive button group
  ButtonGroup buttonGroup1 = new ButtonGroup();

  //Labels on pane 2

  //Table and border on pane 3
  TitledBorder titledBorder1;

  String query;
  ResultSet rs;
  Statement stmt;

  JTable jTable_personal;
  JScrollPane scrollPane_personal;
  
  //Panel 2
  JTable jTable_Flugrouten;
  JScrollPane scrollPane_Flugrouten;


  JTabbedPane jTabbedPane1 = new JTabbedPane();
  JPanel Personal = new JPanel();
  JPanel Dienste = new JPanel();
  JPanel Routen = new JPanel();
  JPanel Info = new JPanel();
  JLabel jLabel2 = new JLabel();
  JLabel jLabel3 = new JLabel();
  JLabel jLabel4 = new JLabel();
  JTextField jTextField1 = new JTextField();
  JLabel jLabel14 = new JLabel();
  JLabel jLabel15 = new JLabel();
  JButton jButton3 = new JButton();
  JLabel jLabel113 = new JLabel();
  JTextField jTextField11 = new JTextField();
  JTextField jTextField12 = new JTextField();
  JLabel jLabel20 = new JLabel();
  JTextField jTextField13 = new JTextField();
  JLabel jLabel114 = new JLabel();
  JLabel jLabel21 = new JLabel();
  JTextField jTextField14 = new JTextField();
  JLabel jLabel22 = new JLabel();
  JTextField jTextField15 = new JTextField();
  JTextField jTextField16 = new JTextField();
  JLabel jLabel23 = new JLabel();
  JLabel jLabel115 = new JLabel();
  JTextField jTextField17 = new JTextField();
  JLabel jLabel24 = new JLabel();
  JLabel jLabel116 = new JLabel();
  JLabel jLabel25 = new JLabel();
  JLabel jLabel26 = new JLabel();
  JLabel jLabel27 = new JLabel();
  JLabel jLabel28 = new JLabel();
  JTextField jTextField111 = new JTextField();
  JLabel jLabel29 = new JLabel();
  JTextField jTextField112 = new JTextField();
  JTextField jTextField113 = new JTextField();
  JLabel jLabel210 = new JLabel();
  JLabel jLabel211 = new JLabel();
  JTextField jTextField114 = new JTextField();
  JComboBox jComboBox4 = new JComboBox();
  JComboBox jComboBox5 = new JComboBox();
  JComboBox jComboBox6 = new JComboBox();
  PopupMenu popupMenu1 = new PopupMenu();
  MenuItem menuItem1 = new MenuItem(); //Construct the frame

  TitledBorder titledBorder2 = new TitledBorder("");
  TitledBorder titledBorder3 = new TitledBorder("");
  TitledBorder titledBorder4 = new TitledBorder("");
  TitledBorder titledBorder5 = new TitledBorder("");
  TitledBorder titledBorder6 = new TitledBorder("");
  TitledBorder titledBorder7 = new TitledBorder("");
  TitledBorder titledBorder8 = new TitledBorder("");
  JScrollBar jScrollBar1 = new JScrollBar();
  Object[] dataObject = {"PilotIn", "Co-PilotIn", "Cabin Crew"};
  JButton jButton2 = new JButton();
  JButton jButton1 = new JButton();
  JLabel jLabel5 = new JLabel();
  JButton jButton4 = new JButton();
  Object[] dataObject2 = {"Name", "Nr."};
  JComboBox jComboBox2 = new JComboBox(dataObject2);
  JLabel jLabel16 = new JLabel();
  JTextField jTextField3 = new JTextField();
  Object[] dataObject3 = {"Typ 1", "Typ 2", "Typ 3"};
  JButton jButton5 = new JButton();
  JButton jButton6 = new JButton();
  JButton jButton9 = new JButton();
  JScrollBar jScrollBar2 = new JScrollBar();
  JTextField jTextField9 = new JTextField();
  TitledBorder titledBorder9 = new TitledBorder("");
  JPanel jPanel1 = new JPanel();
  Object[] dataObject1 = {"Ort", "Land"};
  JComboBox jComboBox1 = new JComboBox(dataObject1);
  JButton jButton10 = new JButton();
  JLabel jLabel6 = new JLabel();
  JButton jButton7 = new JButton();
  JButton jButton8 = new JButton();
  JButton jButton11 = new JButton();
  JLabel jLabel1 = new JLabel();


  public Frame1() throws Exception {
  //table initialisieren
  try {
    
    Connection conn = DriverManager.getConnection(
        "jdbc:mysql://localhost/flightflow?user=root&password=gismo");
    Statement stmt = conn.createStatement();
    query = "SELECT PERSONAL_CD as Code, NAME as Name, VORNAME as Vorname, STRASSE as Strasse, PLZ, ORT as Ort FROM PERSONAL; ";
    ResultSet rs = stmt.executeQuery(query);
//
    DefaultTableModel dtmTable1_personal = DefTabModel.getDefTabModel(rs);
    stmt.close();
    rs.close();
    jTable_personal = new JTable(dtmTable1_personal);

    stmt = conn.createStatement();
    query = "SELECT FLUGROUTEN_CD as Code, FLUGROUTE_TXT as Beschreibung, FLUGDAUER as Dauer FROM FLUGROUTEN; ";
    rs = stmt.executeQuery(query);
//
    DefaultTableModel dtmTable_routen = DefTabModel.getDefTabModel(rs);
    stmt.close();
    rs.close();

    jTable_Flugrouten = new JTable(dtmTable_routen);
  } catch (SQLException ex) {
          System.out.println("Fehler im SQL Statement!");
          ex.printStackTrace();
      }

    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
      jbInit();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

  /**
   * Component initialization
   *
   * @throws Exception exception
   */
  private void jbInit() throws Exception {


    //Initialize main UI frame
    contentPane = (JPanel)this.getContentPane();
    contentPane.setLayout(null);
    this.setSize(new Dimension(650, 580));
    this.setTitle("FlightFlow - Personaleinsatzplanung"); //Initialize tabbed pane
    contentPane.setBackground(Color.white);
    //Create tabbed pane and tabs
    contentPane.setMaximumSize(new Dimension(400000, 400000));
    contentPane.setActionMap(null);

    //Initialize pane 1

    //Initialize pane 2

    //Initialize pane 3
    titledBorder1 = new TitledBorder("");

    //Create pane 1 and buttons

    //Create pane 2 and buttons and labels

    //Create pane 3 and table
    jTabbedPane1.setBounds(new Rectangle(32, 52, 586, 456));
    jTabbedPane1.setBackground(SystemColor.info);
    jTabbedPane1.setFont(new java.awt.Font("Arial", Font.PLAIN, 14));
    jTabbedPane1.setBorder(null);
    jTabbedPane1.setDoubleBuffered(false);
    jTabbedPane1.setNextFocusableComponent(null);
    jTabbedPane1.setToolTipText("");
    jTabbedPane1.setBounds(new Rectangle(26, 41, 582, 484));
    jTabbedPane1.setBounds(new Rectangle(28, 80, 587, 422));
    Info.setLayout(null);
    Info.setBackground(UIManager.getColor("CheckBox.highlight"));
    Info.setBorder(titledBorder8);
    Info.setToolTipText("");
    jLabel2.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel2.setToolTipText("");
    jLabel2.setText("Version, Copyright etc.");
    jLabel2.setBounds(new Rectangle(24, 62, 169, 26));
    jLabel3.setToolTipText("");
    jLabel3.setText("FlightFlow");
    jLabel3.setVerticalAlignment(SwingConstants.TOP);
    jLabel3.setBounds(new Rectangle(28, 505, 72, 25));
    jLabel4.setFont(new java.awt.Font("Arial", 1, 14));
    jLabel4.setToolTipText("");
    jLabel4.setText("Personaldaten");
    jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel4.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel4.setBounds(new Rectangle(24, 26, 133, 21));
    Personal.setLayout(null);
    jTextField1.setToolTipText("");
    jTextField1.setText("");
    jTextField1.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField1.setBounds(new Rectangle(24, 78, 141, 22));
    Routen.setBackground(UIManager.getColor("CheckBox.highlight"));
    Routen.setBorder(titledBorder6);
    Routen.setNextFocusableComponent(Personal);
    Routen.setOpaque(true);
    Routen.setLayout(null);
    Dienste.setLayout(null);
    jLabel14.setFont(new java.awt.Font("Jenkins v2.0", Font.BOLD, 50));
    jLabel14.setToolTipText("");
    jLabel14.setText("FlightFlow");
    jLabel14.setBounds(new Rectangle(27, 6, 243, 57));
    jLabel15.setFont(new java.awt.Font("Arial", 0, 10));
    jLabel15.setText("Version 1.0");
    jLabel15.setBounds(new Rectangle(138, 50, 66, 15));
    jButton3.setText("löschen");
    jButton3.setBounds(new Rectangle(233, 359, 97, 25));
    jButton3.setFont(new java.awt.Font("Dialog", 0, 11));
    jButton3.setFocusPainted(true);
    jLabel113.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel113.setToolTipText("");
    jLabel113.setText("Suchmaske DienstNr");
    jLabel113.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel113.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel113.setBounds(new Rectangle(25, 68, 131, 24));
    jTextField11.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField11.setToolTipText("");
    jTextField11.setText("");
    jTextField11.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField11.setBounds(new Rectangle(182, 66, 70, 22));
    jTextField12.setBounds(new Rectangle(145, 291, 101, 22));
    jTextField12.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField12.setText("");
    jTextField12.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel20.setBounds(new Rectangle(25, 204, 50, 24));
    jLabel20.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel20.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel20.setText("von");
    jLabel20.setToolTipText("");
    jLabel20.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField13.setText("");
    jTextField13.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField13.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField13.setBounds(new Rectangle(94, 134, 61, 22));
    jLabel114.setBounds(new Rectangle(25, 320, 116, 24));
    jLabel114.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel114.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel114.setText("Zielflughafen");
    jLabel114.setToolTipText("");
    jLabel114.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel21.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel21.setToolTipText("");
    jLabel21.setText("DienstNr");
    jLabel21.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel21.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel21.setBounds(new Rectangle(24, 135, 87, 24));
    jTextField14.setBounds(new Rectangle(145, 319, 101, 22));
    jTextField14.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField14.setText("");
    jTextField14.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel22.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel22.setRequestFocusEnabled(true);
    jLabel22.setToolTipText("");
    jLabel22.setText("RouteNr");
    jLabel22.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel22.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel22.setBounds(new Rectangle(171, 135, 87, 24));
    jTextField15.setText("");
    jTextField15.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField15.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField15.setBounds(new Rectangle(145, 234, 101, 22));
    jTextField16.setText("");
    jTextField16.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField16.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField16.setBounds(new Rectangle(61, 202, 120, 22));
    jLabel23.setBounds(new Rectangle(25, 235, 116, 24));
    jLabel23.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel23.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel23.setText("Datum");
    jLabel23.setToolTipText("");
    jLabel23.setRequestFocusEnabled(true);
    jLabel23.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel115.setBounds(new Rectangle(25, 292, 116, 24));
    jLabel115.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel115.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel115.setText("Startflughafen");
    jLabel115.setToolTipText("");
    jLabel115.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField17.setBounds(new Rectangle(239, 135, 61, 22));
    jTextField17.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField17.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField17.setText("");
    jLabel24.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel24.setToolTipText("");
    jLabel24.setText("Pilot");
    jLabel24.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel24.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel24.setBounds(new Rectangle(402, 203, 87, 24));
    jLabel116.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel116.setToolTipText("");
    jLabel116.setText("Cabin Crew");
    jLabel116.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel116.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel116.setBounds(new Rectangle(402, 260, 87, 24));
    jLabel25.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel25.setRequestFocusEnabled(true);
    jLabel25.setToolTipText("");
    jLabel25.setText("Co-Pilot");
    jLabel25.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel25.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel25.setBounds(new Rectangle(402, 230, 87, 24));
    jLabel26.setBounds(new Rectangle(25, 171, 87, 24));
    jLabel26.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel26.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel26.setText("Flug");
    jLabel26.setToolTipText("");
    jLabel26.setRequestFocusEnabled(true);
    jLabel26.setFont(new java.awt.Font("Arial", 1, 14));
    jLabel27.setFont(new java.awt.Font("Arial", 1, 14));
    jLabel27.setRequestFocusEnabled(true);
    jLabel27.setToolTipText("");
    jLabel27.setText("Besatzung");
    jLabel27.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel27.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel27.setBounds(new Rectangle(402, 170, 87, 24));
    jLabel28.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel28.setToolTipText("");
    jLabel28.setText("nach");
    jLabel28.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel28.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel28.setBounds(new Rectangle(194, 202, 56, 24));
    jTextField111.setBounds(new Rectangle(236, 202, 120, 22));
    jTextField111.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField111.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField111.setText("");
    jLabel29.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel29.setRequestFocusEnabled(true);
    jLabel29.setToolTipText("");
    jLabel29.setText("FlugzeugNr");
    jLabel29.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel29.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel29.setBounds(new Rectangle(25, 262, 116, 24));
    jTextField112.setBounds(new Rectangle(145, 262, 38, 22));
    jTextField112.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField112.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField112.setText("");
    jTextField113.setText("");
    jTextField113.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField113.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField113.setBounds(new Rectangle(250, 262, 58, 22));
    jLabel210.setFont(new java.awt.Font("Arial", 0, 14));
    jLabel210.setRequestFocusEnabled(true);
    jLabel210.setToolTipText("");
    jLabel210.setText("Modell");
    jLabel210.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel210.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel210.setBounds(new Rectangle(198, 263, 53, 24));
    jLabel211.setBounds(new Rectangle(313, 263, 53, 24));
    jLabel211.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
    jLabel211.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    jLabel211.setText("Kat");
    jLabel211.setToolTipText("");
    jLabel211.setRequestFocusEnabled(true);
    jLabel211.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField114.setBounds(new Rectangle(344, 263, 38, 22));
    jTextField114.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField114.setFont(new java.awt.Font("Arial", 0, 14));
    jTextField114.setText("");
    jComboBox4.setActionCommand("comboBoxChanged");
    jComboBox4.setBounds(new Rectangle(499, 200, 72, 22));
    jComboBox5.setBounds(new Rectangle(499, 228, 72, 22));
    jComboBox6.setBounds(new Rectangle(499, 256, 72, 22));
    Dienste.setBackground(UIManager.getColor("CheckBox.highlight"));
    Dienste.setBorder(titledBorder4);
    Personal.setBackground(UIManager.getColor("CheckBox.highlight"));
    Personal.setBorder(titledBorder7);
    jTable_personal.setBackground(SystemColor.controlHighlight);
    jTable_personal.setEnabled(true);
    jTable_personal.setFont(new java.awt.Font("Arial", Font.PLAIN, 14));
    jTable_personal.setAutoscrolls(true);
    jTable_personal.setBorder(titledBorder1);
    jTable_personal.setVerifyInputWhenFocusTarget(false);
    jTable_personal.setBounds(new Rectangle(24, 116, 513, 224));
    jScrollBar1.setBounds(new Rectangle(536, 116, 19, 226));
    jButton2.setBounds(new Rectangle(295, 77, 93, 25));
    jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton2.setBorder(null);
    jButton2.setHorizontalAlignment(SwingConstants.LEFT);
    jButton2.setText("  Suche starten...");
    jButton2.addActionListener(new Frame1_jButton2_actionAdapter(this));
    jButton1.setBounds(new Rectangle(23, 359, 97, 25));
    jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton1.setText("neu erfassen");
    jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
    jLabel5.setFont(new java.awt.Font("Arial", Font.BOLD, 14));
    jLabel5.setToolTipText("");
    jLabel5.setText("Flugrouten");
    jLabel5.setVerticalAlignment(SwingConstants.TOP);
    jLabel5.setVerticalTextPosition(SwingConstants.TOP);
    jLabel5.setBounds(new Rectangle(24, 26, 133, 21));
    jButton4.setBounds(new Rectangle(128, 359, 97, 25));
    jButton4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton4.setText("bearbeiten");
    jComboBox2.setFont(new java.awt.Font("Arial", Font.PLAIN, 14));
    jComboBox2.setActionCommand("");
    jComboBox2.setBounds(new Rectangle(176, 78, 111, 22));
    jLabel16.setText("jLabel16");
    jLabel16.setBounds(new Rectangle(0, 0, 40, 15));
    jButton5.setBounds(new Rectangle(128, 359, 97, 25));
    jButton5.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton5.setToolTipText("");
    jButton5.setSelectedIcon(null);
    jButton5.setText("bearbeiten");
    jButton6.setBounds(new Rectangle(23, 359, 97, 25));
    jButton6.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton6.setText("neu erfassen");
    jButton9.setBounds(new Rectangle(233, 359, 97, 25));
    jButton9.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton9.setText("löschen");
    jTable_Flugrouten.setBackground(SystemColor.controlHighlight);
    jTable_Flugrouten.setFont(new java.awt.Font("Arial", Font.PLAIN, 14));
    jTable_Flugrouten.setBorder(titledBorder9);
    jTable_Flugrouten.setBounds(new Rectangle(24, 116, 513, 228));
    jScrollBar2.setBounds(new Rectangle(536, 116, 19, 226));
    jTextField9.setToolTipText("");
    jTextField9.setHorizontalAlignment(SwingConstants.LEFT);
    jTextField9.setBounds(new Rectangle(24, 78, 141, 22));
    jPanel1.setBackground(Color.white);
    jPanel1.setBounds(new Rectangle(18, 71, 553, 317));
    jPanel1.setVisible(false);
    jComboBox1.setFont(new java.awt.Font("Arial", Font.PLAIN, 14));
    jComboBox1.setActionCommand("");
    jComboBox1.setBounds(new Rectangle(176, 78, 89, 22));
    jComboBox1.addActionListener(new Frame1_jComboBox1_actionAdapter(this));
    jButton10.setBounds(new Rectangle(273, 77, 93, 25));
    jButton10.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton10.setBorder(null);
    jButton10.setHorizontalAlignment(SwingConstants.LEFT);
    jButton10.setText("  Suche starten...");
    jLabel6.setFont(new java.awt.Font("Arial", Font.BOLD, 14));
    jLabel6.setToolTipText("");
    jLabel6.setText("FlightFlow Personaleinsatzplanung");
    jLabel6.setVerticalAlignment(SwingConstants.TOP);
    jLabel6.setVerticalTextPosition(SwingConstants.TOP);
    jLabel6.setBounds(new Rectangle(24, 26, 256, 21));
    jButton7.setBounds(new Rectangle(23, 359, 97, 25));
    jButton7.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton7.setText("neu erfassen");
    jButton8.setBounds(new Rectangle(128, 359, 97, 25));
    jButton8.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton8.setToolTipText("");
    jButton8.setText("bearbeiten");
    jButton11.setBounds(new Rectangle(233, 359, 97, 25));
    jButton11.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
    jButton11.setText("löschen");
    jLabel1.setFont(new java.awt.Font("Arial", Font.BOLD, 14));
    jLabel1.setToolTipText("");
    jLabel1.setText("Dienste");
    jLabel1.setVerticalAlignment(SwingConstants.TOP);
    jLabel1.setVerticalTextPosition(SwingConstants.TOP);
    jLabel1.setBounds(new Rectangle(24, 26, 133, 21));
    jTabbedPane1.add(Dienste, "Dienste");
    Dienste.add(jLabel113, null);
    Dienste.add(jTextField11, null);
    Dienste.add(jLabel20, null);
    Dienste.add(jTextField16, null);
    Dienste.add(jTextField111, null);
    Dienste.add(jLabel28, null);
    Dienste.add(jButton7);
    Dienste.add(jButton8);
    Dienste.add(jButton11);
    Dienste.add(jTextField17, null);
    Dienste.add(jLabel21, null);
    Dienste.add(jTextField13, null);
    Dienste.add(jLabel22, null);
    Dienste.add(jLabel26, null);
    Dienste.add(jTextField15, null);
    Dienste.add(jLabel23, null);
    Dienste.add(jTextField14, null);
    Dienste.add(jLabel115, null);
    Dienste.add(jTextField12, null);
    Dienste.add(jLabel114, null);
    Dienste.add(jLabel29, null);
    Dienste.add(jTextField113, null);
    Dienste.add(jLabel210, null);
    Dienste.add(jTextField114, null);
    Dienste.add(jLabel211, null);
    Dienste.add(jTextField112, null);
    Dienste.add(jComboBox6, null);
    Dienste.add(jLabel24, null);
    Dienste.add(jComboBox4, null);
    Dienste.add(jLabel27, null);
    Dienste.add(jLabel25, null);
    Dienste.add(jLabel116, null);
    Dienste.add(jComboBox5, null);
    Dienste.add(jLabel1);
    jTabbedPane1.add(Routen, "Routen");
    Routen.add(jButton6);
    Routen.add(jButton9);
    Routen.add(jTable_Flugrouten);
    Routen.add(new JScrollPane(jTable_Flugrouten));
    Routen.add(jScrollBar2);
    Routen.add(jTextField9);
    Routen.add(jLabel5);
    Routen.add(jButton5);
    Routen.add(jComboBox1);
    Routen.add(jButton10);
    jTabbedPane1.add(Personal, "Personal");
    Personal.add(jPanel1);
    Personal.add(jLabel4, null);
    Personal.add(jTextField1, null);
    Personal.add(jTable_personal);
    Personal.add(jScrollBar1);
    Personal.add(jButton1);
    Personal.add(jButton4);
    Personal.add(jButton3, null);
    Personal.add(jComboBox2);
    Personal.add(jButton2);
    Personal.add(new JScrollPane(jTable_personal));
    jTabbedPane1.add(Info, "Info");
    Info.add(jLabel6);
    Info.add(jLabel2, null);
    contentPane.add(jTabbedPane1, null);
    contentPane.add(jLabel14, null);
    contentPane.add(jLabel15, null);
    contentPane.add(jLabel3, null);
    jTabbedPane1.setSelectedComponent(Dienste);
  }
```

ich bin am Ende.


----------



## Sky (25. Mai 2005)

Der Fehler liegt evtl. in Zeile 521! Du mußt die Tabelle nicht mehr dem Pane zufügen, das sie in 528 schon dem ScrollPane zugefügt wird!


----------

