Results 1 to 1 of 1
-
Swing - Changing component default font
The code snippet below shows how to change component default font.
Java Code:public static void setUIFont (javax.swing.plaf.FontUIResource f){ // // sets the default font for all Swing components. // ex. // setUIFont (new javax.swing.plaf.FontUIResource // ("Serif",Font.ITALIC,12)); // java.util.Enumeration keys = UIManager.getDefaults().keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); Object value = UIManager.get (key); if (value instanceof javax.swing.plaf.FontUIResource) UIManager.put (key, f); } }
Similar Threads
-
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 -
how to set font size for a xml value
By bala_kj in forum Advanced JavaReplies: 3Last Post: 04-01-2008, 11:00 AM -
Printing default Swing values
By Java Tip in forum Java TipReplies: 0Last Post: 03-12-2008, 11:09 AM -
Require Links for free swing component
By Gajesh Tripathi in forum Advanced JavaReplies: 2Last Post: 08-11-2007, 10:24 PM -
Font question
By orchid in forum Java 2DReplies: 1Last Post: 08-01-2007, 02:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks