![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaFX
Stay--hungry
这个作者很懒,什么都没留下…
展开
-
JavaFX03:scene
stage上面要有scene,scene上面要有node(button就是一种node)。默认情况下node会占满所在scene的范围。 stage.setHeight(400); stage.setWidth(400); Button button = new Button("button"); button.setPrefHeight(20); button.setPrefHeight(20); button.setCursor(Cursor.HAND); //设置光标移到它身上时的光标样式 G.原创 2022-05-19 13:37:53 · 392 阅读 · 0 评论 -
JavaFX02:Platform与Screen
在程序空闲时运行一些功能: Platform.runLater(new Runnable(){ @override public void run() { ... } }) 设置关闭所有窗口后程序仍不退出: Platform.setImplicitExit(false); //要想使程序退出,需要调用: Platform.exit(); 判断程序运行的机器是否支持一些功能(特性): boolean f = Platform.isSupported(...) ...原创 2022-05-19 10:56:22 · 232 阅读 · 0 评论 -
JavaFX01:stage
最简单的一个JavaFX程序 package com.example.javafx_test1; import javafx.stage.Stage; import javafx.application.Application; public class HelloApplication extends Application{ //继承Application类 public void start(Stage stage) { //必须要实现一个start方法 stage.sho原创 2022-05-18 23:00:48 · 257 阅读 · 0 评论