title: Accessing a JTextField in JTableHeader
body: <p>I have made a TableHeader renderer that will create a JTextfield under the Label of the header in a JTable.
  The problem i got now, i never get focus/access to this JTextfield in the header.</p>
  
  <p>I found out that a TableHeader renderer only draws the component and dont do the rest, like focus and stuff.</p>
  
  <p>I have tryed to make a array of JTextfield that will set on the header, so i can access them on code base. Unlucky that didnt workout, i was wondering if its possible to get access to this JTextField in the header and what is the best way to do this.</p>
  
  <p>Tableheader renderer:</p>
  
  <pre><code>public class TextFieldTableHeaderRenderer extends AbstractCellEditor implements TableCellRenderer {
  
  private MyPanel component;
  
  public TextFieldTableHeaderRenderer(){
  }
  
  @Override
  public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
      component = new MyPanel(column);
      ((MyPanel)component).setLabelText(value.toString());
      return component;
  }
  
  @Override
  public Object getCellEditorValue() {
      return ((MyPanel)component).getTextField(); 
  }
  </code></pre>
  
  <p>MyPanel:</p>
  
  <pre><code>public class MyPanel extends JPanel {  
  
  private javax.swing.JLabel label;
  private javax.swing.JTextField textField;
  
  public MyPanel(int column) {   
      super();   
      setLayout(new java.awt.BorderLayout());   
      label = new javax.swing.JLabel();   
      textField = new javax.swing.JTextField();  
  
  
      setBorder(javax.swing.BorderFactory.createEtchedBorder());
  
      label.setHorizontalAlignment(SwingConstants.CENTER);
  
      //textField.setText("Column "+column);
  
      add(textField, java.awt.BorderLayout.PAGE_END);
  
      add(label, java.awt.BorderLayout.CENTER);   
  }   
  
  public void setLabelText( String text ){
      label.setText(text);
  }
  
  public void setTextFieldText(String text){
      getTextField().setText(text);
  }
  
  public javax.swing.JTextField getTextField() {   
      return textField;   
  }
  
  /**
   * @param textField the textField to set
   */
  public void setTextField(javax.swing.JTextField textField) {
      this.textField = textField;
  }
  </code></pre>
  
  <p>Install on header:</p>
  
  <pre><code>for( int i=0; i &lt; this.getxColumnModel().getColumnCount(); i++){
              this.getxColumnModel().getColumn(i, true).setHeaderRenderer( new TextFieldTableHeaderRenderer() );
          }
  </code></pre>
  
  <p>I have try to use the "EditableHeader" example from the i-net, but it makes a new JTextfield when clicking on the header.</p>
  
  <p>I like to see that the user get focus on the JTextfield, enters a  text and then it will filter the column. </p>
  
  <p>Filtering wont be a problem, cause i have made that already.</p>
  
  <p>Hopefully im clear to you guys/girls and love to hear you solution</p>