java - JavaFX TextArea - unwanted ScrollBars when resizing -


i have problem resizing update/event of textarea in javafx. illustration created empty javafx project through intellij idea anchorpane root pane , anchorpane contains textarea propecties anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="0.0" in sample.fxml file (in short: textarea takes space of scene).

problem description: launch application , starts in small window (300 x 275). maximalize it. there normal behavioral, when got in window, both of scrollbars shown. similar situation happens when resizing window smaller window. when start scrolling, nothing happens textarea viewport. when start write letter or resize window bigger window, scrollbars disappeared. that's strange behavioral!

my question: there listener or method catch/stop showing scrollbars when isn't necessary? have got problem too?

screenshot after return maximized form

screenshot after return maximized form

main.java

package sample;  import javafx.application.application; import javafx.fxml.fxmlloader; import javafx.scene.parent; import javafx.scene.scene; import javafx.stage.stage;  public class main extends application {      @override     public void start(stage primarystage) throws exception{         parent root = fxmlloader.load(getclass().getresource("sample.fxml"));         primarystage.settitle("hello world");         primarystage.setscene(new scene(root, 300, 275));         primarystage.show();     }       public static void main(string[] args) {         launch(args);     } } 

controller.java

package sample;  public class controller { } 

sample.fxml

<?xml version="1.0" encoding="utf-8"?>  <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?>   <anchorpane maxheight="-infinity" maxwidth="-infinity" minheight="-infinity" minwidth="-infinity" prefheight="480.0" prefwidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">    <children>       <textarea layoutx="162.0" layouty="66.0" prefheight="200.0" prefwidth="200.0" anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="0.0" />    </children> </anchorpane> 

ps: sorry english , repeat insertion of question, if it's bug of javafx, it's acute resolve problem!

this bug seems fixed in jdk 8u60. @ least can't reproduce anymore on macbook pro (retina). there no need anymore complicated work arround :-) (maybe kind confirm windows too.) michael


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -