-
Bug
-
Resolution: Unresolved
-
P3
-
8u45, 9, 10
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Various windows versions
A DESCRIPTION OF THE PROBLEM :
This bug was submitted to javafx community as follow.
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.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Procedure:
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 =
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")
);
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
Scene scene = new Scene(new Group());
double weight = scene.getWidth();;
double height=scene.getHeight();
stage.setTitle("Table View Sample");
stage.setWidth(weight);
stage.setHeight(height);
table.setEditable(true);
TableColumn firstNameCol = new TableColumn("First Name");
firstNameCol.setMinWidth(500);
firstNameCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("firstName"));
TableColumn lastNameCol = new TableColumn("Last Name");
lastNameCol.setMinWidth(500);
lastNameCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("lastName"));
TableColumn emailCol = new TableColumn("Email");
emailCol.setMinWidth(1000);
emailCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("email"));
table.setItems(data);
table.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
root.getChildren().addAll(table);
scene = new Scene(root, weight, height, true);
stage.setScene(scene);
stage.show();
}
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) {
firstName.set(fName);
}
public String getLastName() {
return lastName.get();
}
public void setLastName(String fName) {
lastName.set(fName);
}
public String getEmail() {
return email.get();
}
public void setEmail(String fName) {
email.set(fName);
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Table selection should work regardless of the conditions and states of the window.
ACTUAL -
see description
REPRODUCIBILITY :
This bug can be reproduced often.
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Various windows versions
A DESCRIPTION OF THE PROBLEM :
This bug was submitted to javafx community as follow.
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.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Procedure:
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 =
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")
);
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) {
Scene scene = new Scene(new Group());
double weight = scene.getWidth();;
double height=scene.getHeight();
stage.setTitle("Table View Sample");
stage.setWidth(weight);
stage.setHeight(height);
table.setEditable(true);
TableColumn firstNameCol = new TableColumn("First Name");
firstNameCol.setMinWidth(500);
firstNameCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("firstName"));
TableColumn lastNameCol = new TableColumn("Last Name");
lastNameCol.setMinWidth(500);
lastNameCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("lastName"));
TableColumn emailCol = new TableColumn("Email");
emailCol.setMinWidth(1000);
emailCol.setCellValueFactory(
new PropertyValueFactory<Person, String>("email"));
table.setItems(data);
table.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
root.getChildren().addAll(table);
scene = new Scene(root, weight, height, true);
stage.setScene(scene);
stage.show();
}
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) {
firstName.set(fName);
}
public String getLastName() {
return lastName.get();
}
public void setLastName(String fName) {
lastName.set(fName);
}
public String getEmail() {
return email.get();
}
public void setEmail(String fName) {
email.set(fName);
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Table selection should work regardless of the conditions and states of the window.
ACTUAL -
see description
REPRODUCIBILITY :
This bug can be reproduced often.
- duplicates
-
JDK-8133702 Cannot select row in any screen when screen is maximized
-
- Closed
-
- relates to
-
JDK-8322002 Unable to select row in TableView when Scene.depthBuffer=true
-
- Open
-