Skip to content

Instantly share code, notes, and snippets.

View setaniel's full-sized avatar
🏠
Working from home

Kirill Orlov setaniel

🏠
Working from home
View GitHub Profile
@setaniel
setaniel / ResizableHTMLEditor.java
Last active August 25, 2020 08:20
JavaFX. Auto-resizing HTML Editor panel node in parent node (авторазмер htmleditor панели)
public class ResizableHTMLEditor extends Application {
private HTMLEditor htmlEditor = new HTMLEditor();
private static AnchorPane anchorPane = new AnchorPane();
private Scene scene = new Scene(anchorPane, 420, 565, Color.TRANSPARENT);
@Override
public void start(Stage stage) throws Exception {
htmlEditor.setPrefWidth(360);
//add listener for change size a html editor, if a window size is changed
ChangeListener<Number> stageSizeListener = (observable, oldValue, newValue) ->