Ali*_*sam 17 java swing colors jprogressbar
我用过.setBackground而且.setForeground它们不起作用,颜色就像橙色,无法改变它.
mKo*_*bel 23
我认为这些价值观适合您
UIManager.put("ProgressBar.background", Color.ORANGE);
UIManager.put("ProgressBar.foreground", Color.BLUE);
UIManager.put("ProgressBar.selectionBackground", Color.RED);
UIManager.put("ProgressBar.selectionForeground", Color.GREEN);
Run Code Online (Sandbox Code Playgroud)
Ale*_*xey 18
您应该将setStringPainted属性设置为true:
progressBar.setStringPainted(true);
progressBar.setForeground(Color.blue);
progressBar.setString("10%");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
41873 次 |
| 最近记录: |