小编jav*_*fan的帖子

如何在javafx中制作透明场景和舞台?

我希望有透明的progressindicator,这是无限期的.

这是代码,它显示灰色背景状态/场景.我希望完全透明.

我尝试了下面的代码,但它显示了不透明的后台阶段.

package application;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

    public class Main extends Application {

        @Override
        public void start(Stage stage) {
            /*
             * 
             * my css file content:
             * 
             * .progress-indicator .indicator { -fx-background-color: transparent;
             * -fx-background-insets: 0; -fx-background-radius: 0;
             * 
             * } .progress-indicator { -fx-progress-color: green ; }
             * 
             * 
             * 
             */
            Stage initStage = new Stage();

            initStage.initStyle(StageStyle.TRANSPARENT);
            ProgressIndicator loadProgress = new ProgressIndicator();
            loadProgress.setSkin(null);
            loadProgress.setPrefWidth(50);
            VBox box = new …
Run Code Online (Sandbox Code Playgroud)

javafx stage transparent scene

10
推荐指数
2
解决办法
2万
查看次数

实例变量变为空

我正在研究基于SWT的GUI应用程序.我有一个私有的对象变量.此变量在应用程序运行时的某个时间变为null.我想知道如何设置看门狗类调试,以便我将知道哪个线程使其为空.

java debugging

2
推荐指数
1
解决办法
1517
查看次数

标签 统计

debugging ×1

java ×1

javafx ×1

scene ×1

stage ×1

transparent ×1