title: JavaFX: TableView, need header style
body: <p>I need to display a table that has the exact same elements in the first column as in the first row. As you all know, the first row of any table is called the table header and it has a certain style(normally it's gray). I would like to apply this exact same style to the first row of my table. </p>
  
  <p>So, for example in the table you see here:
  <a href="http://java-buddy.blogspot.fr/2013/03/javafx-embed-button-in-tableview.html" rel="nofollow">http://java-buddy.blogspot.fr/2013/03/javafx-embed-button-in-tableview.html</a></p>
  
  <p>I would like for the column with (0, 1, 2, 3, 4, 5, 6, 7) to have the same style as the header(or first row), the one with(ID, Monday, Tuesday, Wednesday, Thursday, Friday, Action)</p>
  
  <p>Any ideas?</p>
  
  <p>One more thing, I already know how to set a style for a column, namely by setting the column's cellFactory. I am specifically asking how to get the table header's style. In the code below thus, I am asking for the value to have for String variable "headerStyle" ... Thanks.</p>
  
  <pre><code>column.setCellFactory(currentColumn -&gt; {
      return new TableCell&lt;CorrelationTableData, String&gt;() {
          @Override
          protected void updateItem(String item, boolean empty) {
              super.updateItem(item, empty);
              if (item == null || item.length() == 0)
                  setText(null);
              else {
                  setText(item);
                  setAlignment(Pos.CENTER);
                  if (j == 0 ) {
                      String headerStyle = "";
                      setStyle(style);
                  } else {
                      if (item.charAt(0) == '-') 
                          setTextFill(Color.RED); 
                      else
                          setTextFill(Color.BLUE);
                  }
              }            
          }
      };
  });
  </code></pre>