简体   繁体   English

在Windows上禁用Java AWT TextField时不会重影

[英]Java AWT TextField does not get ghosted when disabled on Windows

I have an AWT text field that gets enabled and disabled based on the state of a Checkbox. 我有一个根据复选框状态启用和禁用的AWT文本字段。 On OSX when the TextField is disabled it gets ghosted but this does not occur on Windows 7. Is this how it is supposed to work on Windows? 在OSX上,当禁用TextField时,它会变成幻影,但在Windows 7上不会发生。这是否应该在Windows上起作用? Is there a way to get the TextField to become ghosted on Windows. 有没有一种方法可以使TextField在Windows上重影。 Note: We are doing a little maintenance on some very old code and for compatibility we must use AWT and cannot switch over to swing at this time. 注意:我们正在对一些非常旧的代码进行一些维护,为了兼容,我们必须使用AWT,并且此时不能切换到摆动。

AWT gets look and feel from window manager of operating system. AWT从操作系统的窗口管理器获得外观。

On OSX disabled AWT text field looks ghosted because OSX window manager makes it look so. 在OSX禁用的情况下,AWT文本字段看起来像是幻影的,因为OSX窗口管理器使它看起来像这样。

So it wont be possible to bring ghosted effect but will look grayed out using AWT for disabled component on Windows 7. 因此,不可能带来幻影效果,但对于Windows 7上的禁用组件,使用AWT时将显示为灰色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有更多窗口打开时结束Java AWT线程 - Ending the Java AWT thread when there are no more windows open 专注于Java时如何获取实际文本字段 - How to get actual textfield when is focused in java 在bash上运行arduino时(通过Linux的Windows子系统),线程“ AWT-EventQueue-0”中的异常java.awt.HeadlessException - Exception in thread “AWT-EventQueue-0” java.awt.HeadlessException when running arduino on bash (via Windows subsystem of Linux) java.awt.TextField无法转换为javafx.scene.node - java.awt.TextField cannot be converted to javafx.scene.node 使用setText清除TextField的内容在AWT中不起作用 - Clearing contents of TextField using setText does not work in AWT java.awt.Trayicon 在 java 应用程序安装为 windows 7 服务时不显示 - java.awt.Trayicon is not displaying when java application is installed as windows 7 service 使用java AWT确定字幕窗口7的大小 - Determine the size of caption windows 7 using java AWT Java Awt Robot改变了Windows鼠标速度 - Java Awt Robot changes Windows Mouse Speed 为什么会出现“线程中的异常”AWT-EventQueue-0“java.lang.OutOfMemoryError: Java heap space”错误? - Why does this get “Exception in thread ”AWT-EventQueue-0“ java.lang.OutOfMemoryError: Java heap space” error? 如何获取java.awt.Image的ColorSpace? - How to get ColorSpace of java.awt.Image?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM