Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095471

[TableView] TableCell border lines are rendered incorrectly



    • Bug
    • Resolution: Fixed
    • P2
    • 8u40
    • 8u40
    • javafx
    • Windows 7 64bits


      Run this sample program

      import javafx.application.Application;
      import javafx.beans.property.SimpleStringProperty;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableList;
      import javafx.event.EventHandler;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.ContextMenu;
      import javafx.scene.control.Label;
      import javafx.scene.control.MenuItem;
      import javafx.scene.control.SelectionMode;
      import javafx.scene.control.TableColumn;
      import javafx.scene.control.TableColumn.CellEditEvent;
      import javafx.scene.control.TableView;
      import javafx.scene.control.cell.PropertyValueFactory;
      import javafx.scene.control.cell.TextFieldTableCell;
      import javafx.scene.layout.HBox;
      import javafx.scene.text.Font;
      import javafx.stage.Stage;

      public class TableViewSample extends Application {

          private TableView<Person> table = new TableView<Person>();
          private final ObservableList<Person> data
                  = FXCollections.observableArrayList();
          final HBox hb = new HBox();

          public static void main(String[] args) {

          public void start(Stage stage) {
              Scene scene = new Scene(new Group());
              stage.setTitle("Table View Sample");

              for (int i = 0; i < 10; ++i) {
                  data.add(new Person(String.valueOf(i), "lol", "lol"));

              final Label label = new Label("Address Book");
              label.setFont(new Font("Arial", 20));

              ContextMenu menu = new ContextMenu();
              MenuItem item = new MenuItem("test");

              for (int i = 0; i < 10; ++i) {
                  TableColumn emailCol = new TableColumn("Email");
                          new PropertyValueFactory<Person, String>("email"));
                          new EventHandler<CellEditEvent<Person, String>>() {
                              public void handle(CellEditEvent<Person, String> t) {
                                  ((Person) t.getTableView().getItems().get(

              ((Group) scene.getRoot()).getChildren().addAll(table);


          public static class Person {

              private final SimpleStringProperty firstName;
              private final SimpleStringProperty lastName;
              private final SimpleStringProperty email;

              private Person(String fName, String lName, String email) {
                  this.firstName = new SimpleStringProperty(fName);
                  this.lastName = new SimpleStringProperty(lName);
                  this.email = new SimpleStringProperty(email);

              public String getFirstName() {
                  return firstName.get();

              public void setFirstName(String fName) {

              public String getLastName() {
                  return lastName.get();

              public void setLastName(String fName) {

              public String getEmail() {
                  return email.get();

              public void setEmail(String fName) {

      You will need a "test.css" file with that inside


          -fx-padding: 0 0 0 0.2em;
          -fx-border-color: black;
          -fx-border-width : 0.3px;
          -fx-background-color: -fx-table-cell-border-color,white;

      The border of the TableCell should be black but instead you can see that the borders only appear when you click on them. When you drag, all borders are gone except the columns edge when keep dragging..

      This is a serious regression that appears on JDK 8u40b16 and was not there on JDK8u40 b15.


        1. Table-bad.png
          27 kB
          Kevin Rushforth
        2. Table-dirty.png
          27 kB
          Kevin Rushforth
        3. Table-good-b15.png
          23 kB
          Kevin Rushforth

        Issue Links



              flar Jim Graham
              shadzic Samir Hadzic
              0 Vote for this issue
              5 Start watching this issue