When a TextArea is resized horizontally by hand, the horizontal scrollbar appears/flickers, even though there is nothing in the TextArea.
package application;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
TextArea textArea = new TextArea();
BorderPane root = new BorderPane();
root.setCenter(textArea);
root.setMinSize(120, 240);
primaryStage.setScene(new Scene(root));
primaryStage.setTitle("JavaFX TextArea Test");
primaryStage.show();
}
}
1. Run test application.
2. Grab the right border of the window and make it bigger horizontally, everything's okay.
3. Now make it smaller again, the horizontal scrollbar flickers.
Used theme is Caspian, if that is of importance.
package application;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
TextArea textArea = new TextArea();
BorderPane root = new BorderPane();
root.setCenter(textArea);
root.setMinSize(120, 240);
primaryStage.setScene(new Scene(root));
primaryStage.setTitle("JavaFX TextArea Test");
primaryStage.show();
}
}
1. Run test application.
2. Grab the right border of the window and make it bigger horizontally, everything's okay.
3. Now make it smaller again, the horizontal scrollbar flickers.
Used theme is Caspian, if that is of importance.
- duplicates
-
JDK-8097060 [Modena, TextArea] Vertical scrollbar appears in TextArea and then disappears
-
- Resolved
-