我的CheckBox中的下划线在哪里?

 隐之王语录 发布于 2023-01-20 20:13

用于显示问题的最短程序:

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.Priority;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;


public class TestCheckBox extends Application  {

    public static void main(String[] args) {
        launch(args);
    }

    public void start(Stage stage) {
        Scene scene = new Scene(new StackPane());
        final VBox vbox = new VBox();
        vbox.getChildren().addAll(new Label("ABC_DEF"), new CheckBox("ABC_DEF"));
        ((StackPane) scene.getRoot()).getChildren().add(vbox);
        stage.setScene(scene);
        stage.show();
    }
}

导致:

在此输入图像描述

相比之下,在SceneBuilder中它正常显示,但不在我的应用程序中.我正在运行Java 1.8.0-b129

任何提示?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有