【问题标题】:How to change the color of | of JTextField [duplicate]如何改变 | 的颜色JTextField [重复]
【发布时间】:2017-08-02 08:01:54
【问题描述】:

你知道如何改变|的颜色吗?在 JTextField 中出现和消失?因为JTextField本身颜色很深我看不到但是我不想改变它,所以我想改变|的颜色。 附言改变前景的颜色不会影响这件事。还有这个东西怎么叫(|)?

【问题讨论】:

    标签: java swing colors jtextfield


    【解决方案1】:

    也许你在问插入符号的颜色!

    这篇文章会对你有所帮助:

    How to change the cursor blink color?

    【讨论】:

      【解决方案2】:

      您需要的缺失信息是JTextField 中的光标被称为“插入符号”。

      JTextFieldJTextComponent 的子类,它有一个可以使用的setCaretColor(...) 方法。

      【讨论】:

      • 谢谢,这正是我需要的!
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-10
      • 1970-01-01
      • 2014-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-11
      相关资源
      最近更新 更多