This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Still not 100% certain about what makes a beginner/intermediate/advanced query, so apologies if this is in the wrong place!
Anyway, to the point - I'm trying to make a Word-style drop-down font selection list. I'm guessing that the best option is a JComboBox populated with all the fonts in my system - so the question that I'm asking is: is there a way to get a list of all my fonts?
Any other advice much appreciated! [ February 20, 2006: Message edited by: David Payne ]
I knew there must be one, because I wrote one myself. But I wrote it a couple of years ago (so I don't remember what I did) and it's on my home computer. So I quickly checked the documentation for java.awt.Font and after scrolling down a bit I came upon this sentence:
"The getAllFonts method of the GraphicsEnvironment class returns an array of all font faces available in the system."
It goes on to explain what to do with that list, but in any case that's your starting point.
Joined: Jan 31, 2006
Splendid, couldn't have hoped for a better answer!