Results 1 to 3 of 3
Thread: Change JTextField Font?
- 03-25-2010, 11:05 AM #1
Member
- Join Date
- Nov 2008
- Posts
- 43
- Rep Power
- 0
Change JTextField Font?
Hello,
I cannot figure out how to change the font of a JTextField
I know to use;
But I want to use a custom font I have downloaded.Java Code:Font newFont = new Font("DeutscheZierschrift", 0, 16); aField.setFont(newFont);
I put "DeutscheZierschrift.ttf" in the following folder
java>jre6>lib>fonts
but when I try to load it in java, the text does not change.
Anyone know how to get this working?
Thank You
- 03-25-2010, 03:24 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,143
- Rep Power
- 5
Read the Font API. I would guess you need to use the Font.createFont(...) method.But I want to use a custom font I have downloaded.
- 03-25-2010, 05:50 PM #3
Similar Threads
-
Change the Font Size and Text Position
By stayfierce in forum New To JavaReplies: 1Last Post: 12-03-2009, 05:17 AM -
How to change font/ font color etc in a graphic object using JCombobox?
By JavaInLove in forum AWT / SwingReplies: 5Last Post: 04-25-2009, 08:00 PM -
what is that method to change the size of a font in an applet?
By javanoobita in forum New To JavaReplies: 4Last Post: 02-22-2009, 06:31 AM -
How to change The Font
By kader in forum New To JavaReplies: 2Last Post: 09-15-2008, 04:09 AM -
How to use TextAttribute class to change color and font of a text
By Java Tip in forum java.awtReplies: 0Last Post: 06-25-2008, 10:33 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks