-
Bug
-
Resolution: Fixed
-
P4
-
7u45, 8
-
All
If you run the code below, it displays a table with some columns.
Move the mouse over the edge of a column and it changes the cursor to the resize icon. Press the mouse button down and drag and notice that the cursor flicks back and forth between the resize icon and the normal icon.
This is caused by my least favorite bug (https://javafx-jira.kenai.com/browse/RT-34608) here.
However, it should be easy to get round the problem in this case as you can "lock" the cursor to the resize icon when a user clicks down in the resize area and keep it that way until they release the mouse button.
I expect what is happening at the moment is the cursor changes when it is over the resize area but because of the bug this lags behind where the cursor is when it is being resized.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TableColumnResizeTest extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane pane = new BorderPane();
Scene scene = new Scene(pane, 500, 500);
stage.setScene(scene);
TableView<String[]> table = new TableView<>();
for (int i = 0; i < 4; i++) {
table.getColumns().add(new TableColumn<>("Column " + i));
}
pane.setCenter(table);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
Move the mouse over the edge of a column and it changes the cursor to the resize icon. Press the mouse button down and drag and notice that the cursor flicks back and forth between the resize icon and the normal icon.
This is caused by my least favorite bug (https://javafx-jira.kenai.com/browse/RT-34608) here.
However, it should be easy to get round the problem in this case as you can "lock" the cursor to the resize icon when a user clicks down in the resize area and keep it that way until they release the mouse button.
I expect what is happening at the moment is the cursor changes when it is over the resize area but because of the bug this lags behind where the cursor is when it is being resized.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TableColumnResizeTest extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane pane = new BorderPane();
Scene scene = new Scene(pane, 500, 500);
stage.setScene(scene);
TableView<String[]> table = new TableView<>();
for (int i = 0; i < 4; i++) {
table.getColumns().add(new TableColumn<>("Column " + i));
}
pane.setCenter(table);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
- relates to
-
JDK-8091649 Consider fixing the cursor when a mouse drag occurs, so that the cursor is not changed based on the currently picked Node
- Open