0

我正在使用 Scene Builder 制作登录屏幕。我的 PasswordField 的背景颜色是灰色的,我希望你写东西时出现的星星是白色的。即使我将文本和提示颜色设置为白色,它们当前也是黑色的(在普通的 TextField 上有效,但在此处无效)。

我在哪里设置正确的颜色?

4

2 回答 2

1

我用-fx-text-color而不是-fx-text-fill

于 2018-05-16T10:44:23.877 回答
0

JFXPasswordField extends PasswordField( )有许多 2 种不同的颜色PasswordField extends TextField

this.setUnFocusColor(Paint color)
this.setFocusColor(Paint color)

也许它可以帮助你

于 2018-05-15T21:07:16.693 回答