You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class JavaFxTest10 extends Application {
private static record Student (int id, int mark) {};
private TableView<Student> table = new TableView<>(FXCollections.observableList(
List.of(new Student(1, 3), new Student(2, 4), new Student(3, 5))));
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
Application.setUserAgentStylesheet(new Dracula().getUserAgentStylesheet());
var idColumn = new TableColumn<Student, Integer>("Id");
idColumn.setCellValueFactory((data) -> new ReadOnlyObjectWrapper<>(data.getValue().id()));
var markColumn = new TableColumn<Student, Integer>("Mark");
markColumn.setCellValueFactory((data) -> new ReadOnlyObjectWrapper<>(data.getValue().mark()));
table.getColumns().addAll(idColumn, markColumn);
table.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
table.getSelectionModel().setCellSelectionEnabled(true);
VBox root = new VBox(new TextField(), table);
var scene = new Scene(root, 400, 300);
primaryStage.setScene(scene);
primaryStage.show();
}
}
If you run it with AtlantaFX you will get this result:
If cell selection is disabled then you will get this result:
As you see selection color is different in both cases. However in pure JavaFX selection color is always the same:
Is this a bug I misunderstand something?
The text was updated successfully, but these errors were encountered:
This is code:
If you run it with AtlantaFX you will get this result:
If cell selection is disabled then you will get this result:
As you see selection color is different in both cases. However in pure JavaFX selection color is always the same:
Is this a bug I misunderstand something?
The text was updated successfully, but these errors were encountered: