【发布时间】:2012-08-07 06:21:07
【问题描述】:
比较直接,如何设置 JMenuBar 的背景颜色?
我试过了:
MenuBar m = new MenuBar() {
void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setBackground(Color.yellow);
g2.fillRect(0, 0, getWidth(), getHeight());
}
但没什么
【问题讨论】:
标签: java swing colors background jmenubar