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

Border style none is not working on TableCell


    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 8u66
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
    • Subcomponent:
    • CPU:
    • OS:


      Run this sample program:

      import java.util.ArrayList;
      import java.util.List;
      import javafx.application.Application;
      import javafx.beans.property.SimpleStringProperty;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableList;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.SelectionMode;
      import javafx.scene.control.TableColumn;
      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 {

          List<TableColumn<Person, ?>> list = new ArrayList<>();

          private TableView<Person> table = new TableView<Person>();
          private final ObservableList<Person> data
                  = FXCollections.observableArrayList(
                          new Person("Jacob", "Smith", "jacob.smith@example.com"),
                          new Person("Isabella", "Johnson", "isabella.johnson@example.com"),
                          new Person("Ethan", "Williams", "ethan.williams@example.com"),
                          new Person("Emma", "Jones", "emma.jones@example.com"),
                          new Person("Michael", "Brown", "michael.brown@example.com"));
          final HBox hb = new HBox();

          public static void main(String[] args) {

          public void start(Stage stage) {
              final Label label = new Label("Address Book");
              label.setFont(new Font("Arial", 20));


              for (int i = 0; i < 1000; ++i) {
                  data.add(new Person("Jacob", "Smith", "jacob.smith@example.com"));

              Scene scene = new Scene(table);
              stage.setTitle("Table View Sample");


          public void addColumns() {
              for (int i = 0; i < 20; ++i) {
                  TableColumn firstNameCol = new TableColumn("First Name");
                          new PropertyValueFactory<Person, String>("firstName"));


          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 this css :

          -fx-border-width : 3px;
          -fx-border-color :black;
          /*-fx-background-color: black;*/
          -fx-border-style : none;

      When you run it, all border are black. So basically, if you specify "solid" for border style or "none", the result is the same.


          Issue Links



              • Assignee:
                jgiles Jonathan Giles
                shadzic Samir Hadzic
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: