| Author |
working with Fonts
|
Greg Reeder
Ranch Hand
Joined: Jun 14, 2011
Posts: 99
|
|
Hello everyone.
My question of the day is regarding the font size in a JTable. (I think it should be pretty easy, but I dont know it). i want to be able to change the font size. I have found multiple sites which say to change the font size, I need to call table.setFont( new Font()) In the constructor I need to declare the font name, style, and size. Does Java have a list of default font styles that I can choose from, or must I provide my own font file so that i can declare a new font? Or is there some sort of method like new Font(getDefaultFont().setFontSize()) or something? If there is a list, where can I find it?
Thanks for your help.
Greg
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4165
|
|
Greg Reeder wrote:is there some sort of method like new Font(getDefaultFont().setFontSize()) or something?
Have you gone through the methods available in the Font API?
Greg Reeder wrote:is there some sort of method like new Font(getDefaultFont().setFontSize()) or something? If there is a list, where can I find it?
http://download.oracle.com/javase/6/docs/api/java/awt/GraphicsEnvironment.html#getAllFonts()
|
 |
Greg Reeder
Ranch Hand
Joined: Jun 14, 2011
Posts: 99
|
|
|
Thank you. it was not exactly what i was looking for, but it definately put me on the right track.
|
 |
 |
|
|
subject: working with Fonts
|
|
|