[英]Why does there have a transparent but small top panel in application developed in Java?
look at top panel: 看顶部面板:
I am developing a application like alfred using javafx. 我正在使用javafx开发类似alfred的应用程序。 As you can see,there is a transparent top panel.There is also a same problem when using swing.
如您所见,有一个透明的顶部面板。使用秋千时也存在同样的问题。 My development environment is as follows.
我的开发环境如下。
package sample;
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = new Parent() {
};
primaryStage.initStyle(StageStyle.UTILITY);
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 500, 275));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
I had found the cause that compton,a compositor for X,has a feature "Titlebar/frame transparency". 我发现了导致X的合成器compton具有“标题栏/框架透明度”功能的原因。 – z10030313335
– z10030313335
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.