Reputation: 603
I'm trying to change the font in an AWT menu bar using MenuBar.setFont()
. The call works for the menu bar's child menus, but the menu bar itself doesn't change font (I'm trying to make the font larger).
Does anyone know whether this is possible to do?
I'm using JRE 1.6 on Windows XP.
Update: Changing the font does seem to work so long as the text fits within the menu bar height, otherwise the font size is reduced.
Upvotes: 2
Views: 1536
Reputation: 55123
Use Swing. I don't think that AWT is capable of restyling native component peers in a reliable fashion. I know for certain that SWT can't, and it's a far more sophisticated toolkit than AWT. This is part of why it was essentially deprecated (in favor of Swing) back in Java 1.2.
Upvotes: 2