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

Cannot select row in tableview when maximizing or resizing window



    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u5, 8u11, 8u20, 8u25
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Windows 7 Prof, I5, I7, Intel HD graphics, Intel 4600


      When maximizing the application window that contains table, table row cannot be selected. If window is not maximized then the table allow selection.
      I have played around with different systems and different system behaves differently (providing the same hardware and settings).
      For examples,
      A. Couple I7 windows 7 prof with intel 4600 graphic cards:
        On one system, it works fine if the application is in a monitor (dual monitors) that does not have task bar. It does not work on the monitor that has task bar (when maximized). On the same system, sometime unchecking the "use small icons" checkbox in the taskbar properties will make it not work.
        On one system, changing the text size in display settings from smaller (default) to medium will break it too.
        On some other systems it works fine.

      Run the following code.
      Maximize the window
      Try to select a row.

      Here is the code that I use to test:

      import javafx.application.Application;
      import javafx.beans.property.SimpleStringProperty;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableList;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.TableColumn;
      import javafx.scene.control.TableView;
      import javafx.scene.control.cell.PropertyValueFactory;
      import javafx.scene.layout.HBox;
      import javafx.scene.text.Font;
      import javafx.stage.Stage;
      public class table extends Application {
          HBox root = new HBox();
          private TableView<Person> table = new TableView<Person>();
          private final ObservableList<Person> data =
                  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")
          public static void main(String[] args) {
          public void start(Stage stage) {
              Scene scene = new Scene(new Group());
              double weight = scene.getWidth();;
              double height=scene.getHeight();
              stage.setTitle("Table View Sample");
              TableColumn firstNameCol = new TableColumn("First Name");
                      new PropertyValueFactory<Person, String>("firstName"));
              TableColumn lastNameCol = new TableColumn("Last Name");
                      new PropertyValueFactory<Person, String>("lastName"));
              TableColumn emailCol = new TableColumn("Email");
                      new PropertyValueFactory<Person, String>("email"));
              table.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
              scene = new Scene(root, weight, height, true);
          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) {


          Issue Links



              Unassigned Unassigned
              duke J. Duke (Inactive)
              0 Vote for this issue
              1 Start watching this issue