【问题标题】:Editing the output screen编辑输出画面
【发布时间】:2014-12-16 12:48:43
【问题描述】:

我正在为我在 netbeans 中的输出截屏,我想让用户输入的内容只有彩色。 我尝试使用输出屏幕左侧的螺丝刀,然后使用颜色和字体,但它只编辑代码的主体.. 有没有可能,有什么建议。

【问题讨论】:

  • 创建一个 Swing GUI 并编辑输出 JTextArea 的字体和前景色。

标签: java netbeans colors output


【解决方案1】:

在 netbeans 中转到:

Window -> Options -> Miscellaneous -> Output

在这里,您可以通过更改Input Color 选项的值来更改用户输入的颜色。

【讨论】:

    【解决方案2】:

    将更改 JFrame 组件的背景和文本颜色的简单代码。

    input.setBackground(Color.BLACK);
    input.setForeground(Color.GREEN);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多