This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Monospaced font on a JMenuItem

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'd like to use a monospaced font within a JMenuItem's text.
I guess its possible to use html to do this inside the String, but this plays up when you use spaces.

Is there another way, eg using Fonts?

Thanks
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, just use the following:

Or were you wanting only a portion of the text to be monospace?
[ May 18, 2007: Message edited by: Darrin Cartwright ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic