Skip to main content

Java

Go Search
Linda Noss
APCS
Java
VGP
Web Page Design
Consumer Math
Desktop Publishing
See your grade
  
Linda Noss > Java > Code Hints > Creating your own Font  

Code Hints

Modify settings and columns
Use this page to post questions and answers (no complete programs)
  
View: 
Post
Started: 3/29/2010 7:25 AM
Picture: Linda Noss
Linda Noss
Creating your own Font
Fonts are an object like Buttons or Text Field. You can create your own fonts by declaring a Font object, giving it a name and then describing the font with new.
 
private Font myFont = new Font("Times New Roman", Font.PLAIN, 12)
 
 
There are also font classes. you can specify a class and the computer will figure out the rest.
 
Font littleFont = new Font("Monospaced", Font.PLAIN, 10);
 
For more information about fonts look a the font class API.
Posted: 3/29/2010 7:26 AM
Picture: Linda Noss
Linda Noss