title: JTable invisible despite setVisible(true)
body: <p>I have the following panel in NetBeans (only around the first third is my work, the rest is auto-generated and unmodifiable):</p>
  
  <pre><code>public class ScorePanel extends javax.swing.JPanel {
  
  private DefaultTableModel dtm;
  
  public ScorePanel() {
      initComponents();
      dtm = (DefaultTableModel) scoreTable.getModel();
      for(int i = dtm.getRowCount() - 1; i &gt;= 0; i--)
          dtm.removeRow(i);
      loadFile();
  }
  
  private void loadFile(){
      FileInputStream ins = null;
      try {
          ins = new FileInputStream("./src/Resources/score.txt");
          Scanner fScanner = new Scanner(ins, "UTF-8");
          String[] str;
          while(fScanner.hasNextLine()){
              str = fScanner.nextLine().split(";");
              dtm.addRow(new Object[]{str[0].trim(), Integer.parseInt(str[1].trim()), str[2]});
          }
          fScanner.close();
      } catch (FileNotFoundException ex) {
          Logger.getLogger(ScorePanel.class.getName()).log(Level.SEVERE, null, ex);
      } finally {
          try {
              if(ins != null)
                  ins.close();
          } catch (IOException ex) {
              Logger.getLogger(ScorePanel.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  }
  
  // The rest of the code was auto-generated by NetBeans and cannot be modified
  
  private void initComponents() {
  
      titleLabel = new javax.swing.JLabel();
      jScrollPane1 = new javax.swing.JScrollPane();
      scoreTable = new javax.swing.JTable();
      menuButton = new javax.swing.JButton();
      nameField = new javax.swing.JTextField();
      scoreLabel = new javax.swing.JLabel();
      timeLabel = new javax.swing.JLabel();
      addButton = new javax.swing.JButton();
      saveButton = new javax.swing.JButton();
  
      setMaximumSize(new java.awt.Dimension(640, 480));
      setMinimumSize(new java.awt.Dimension(640, 480));
      setPreferredSize(new java.awt.Dimension(640, 480));
      setLayout(null);
  
      titleLabel.setFont(new java.awt.Font("Snap ITC", 2, 36)); // NOI18N
      titleLabel.setForeground(new java.awt.Color(51, 102, 0));
      titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
      titleLabel.setText("Zaku Attack!");
      add(titleLabel);
      titleLabel.setBounds(170, 56, 300, 47);
  
      scoreTable.setAutoCreateColumnsFromModel(false);
      scoreTable.setAutoCreateRowSorter(true);
      scoreTable.setModel(new javax.swing.table.DefaultTableModel(
          new Object [][] {
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null}
          },
          new String [] {
              "Name", "Score", "Time"
          }
      ) {
          Class[] types = new Class [] {
              java.lang.String.class, java.lang.Integer.class, java.lang.String.class
          };
          boolean[] canEdit = new boolean [] {
              false, false, false
          };
  
          public Class getColumnClass(int columnIndex) {
              return types [columnIndex];
          }
  
          public boolean isCellEditable(int rowIndex, int columnIndex) {
              return canEdit [columnIndex];
          }
      });
      scoreTable.setRowSelectionAllowed(false);
      scoreTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
      jScrollPane1.setViewportView(scoreTable);
  
      add(jScrollPane1);
      jScrollPane1.setBounds(160, 191, 320, 190);
  
      menuButton.setText("Back to Menu");
      menuButton.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
              menuButtonActionPerformed(evt);
          }
      });
      add(menuButton);
      menuButton.setBounds(250, 410, 137, 23);
      add(nameField);
      nameField.setBounds(160, 170, 130, 20);
      add(scoreLabel);
      scoreLabel.setBounds(290, 170, 60, 20);
      add(timeLabel);
      timeLabel.setBounds(350, 170, 60, 20);
  
      addButton.setText("Add");
      addButton.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
              addButtonActionPerformed(evt);
          }
      });
      add(addButton);
      addButton.setBounds(410, 170, 70, 23);
  
      saveButton.setText("Save to File");
      saveButton.setMaximumSize(menuButton.getMaximumSize());
      saveButton.setMinimumSize(menuButton.getMinimumSize());
      saveButton.setPreferredSize(menuButton.getPreferredSize());
      saveButton.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
              saveButtonActionPerformed(evt);
          }
      });
      add(saveButton);
      saveButton.setBounds(250, 390, 140, 23);
  }// &lt;/editor-fold&gt;                        
  
  private void menuButtonActionPerformed(java.awt.event.ActionEvent evt) {                                           
      parent.switchPanel(MainWindow.PanelName.MENU);
  }                                          
  
  private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
      if(!nameField.getText().isEmpty()){
          dtm.addRow(new Object[]{nameField.getText(), scoreLabel.getText(), timeLabel.getText()});
          nameField.setText("");
          scoreLabel.setText("");
          timeLabel.setText("");
          addButton.setEnabled(false);
          scoreTable.revalidate();
      }
  }                                         
  
  private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {                                           
      if(dtm.getRowCount() != 0){
          File file = new File("./src/Resources/score.txt");
              try {
                  if(!file.exists())
                      file.createNewFile();
                  FileWriter fw = new FileWriter(file);
                  int i;
                  for(i = 0; i &lt; dtm.getRowCount(); i++)
                      fw.write(dtm.getValueAt(i, 0) + ";" +
                                          dtm.getValueAt(i, 1)+ ";" +
                                          dtm.getValueAt(i, 2));
                  fw.close();
                  JOptionPane.showMessageDialog(this,"Done saving file.","Completed",JOptionPane.INFORMATION_MESSAGE);
              } catch (IOException ex1) {
                  JOptionPane.showMessageDialog(null,"Error while saving file.","Error",JOptionPane.ERROR_MESSAGE);
              }
      }
  }                                          
  
  // Variables declaration - do not modify                     
  private javax.swing.JButton addButton;
  private javax.swing.JScrollPane jScrollPane1;
  private javax.swing.JButton menuButton;
  private javax.swing.JTextField nameField;
  private javax.swing.JButton saveButton;
  private javax.swing.JLabel scoreLabel;
  private javax.swing.JTable scoreTable;
  private javax.swing.JLabel timeLabel;
  private javax.swing.JLabel titleLabel;
  // End of variables declaration                   
  }
  </code></pre>
  
  <p>My problem is that the panel's sole table is invisible and doesn't show up even after <code>setVisible(true)</code> is called on it. The table's data model does have the contents of the table and said contents can be read and written normally - they're just not visible.</p>
  
  <p>Drawing from my recent similar problems, can it be caused by the panel layout or look-and-feel?</p>