简体   繁体   English

为什么在用Java开发的应用程序中有一个透明但很小的顶部面板?

[英]Why does there have a transparent but small top panel in application developed in Java?

look at top panel: 看顶部面板:

https://i.stack.imgur.com/TRAbb.gif

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. 我的开发环境如下。

  • OS: Arch Linux 操作系统:Arch Linux
  • Kernel: x86_64 Linux 4.8.13-1-ARCH 内核:x86_64 Linux 4.8.13-1-ARCH
  • WM: i3 WM:i3
  • Java: "1.8.0_102" Java:“ 1.8.0_102”

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.

相关问题 为什么此计时器中的 alpha 会在此 Java Swing 面板中自行绘制? - Why does the alpha in this timer draw on top of itself in this Java Swing Panel? 为什么说Java语言是在C,C ++之上开发的? - Why is it said that the java language was developed on top of C, C++? 如何让在 NetBeans 中开发的 Java Swing 应用程序没有丑陋的按钮? - How to make Java Swing application developed in NetBeans not have hideous buttons? 在画布上设置透明面板 - set transparent panel on top of canvas 我用Java(Eclipse)制作了带有面板的框架,按十字按钮时应用程序无法关闭 - I have made a frame with panel in Java (Eclipse), the application does not close on pressing the cross button 另一个面板上的Java透明面板 - Java Transparent Panel Over Another Panel 当QTP与Java插件一起安装时,用Java开发的客户端应用程序不会启动 - When QTP is installed with Java Addin, an client application developed in Java does not launch 为什么我的标题边框面板这么小 - Why is my Titled Border Panel so small 为什么这个Java小程序会让MacOS重启? - Why does this small Java program make MacOS restart? 为什么这个很小的Java程序似乎会泄漏内存? - Why does this very small Java program seemingly leak memory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM