How to change the default font of the text in a JEditorPane ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   creusot_Vincent
Posted On:   Thursday, June 20, 2002 01:23 AM

I just want to change the font of the text in an editable JEditorPane to SansSerif. Don't know how to do ??

Re: How to change the default font of the text in a JEditorPane ?

Posted By:   Lunkwill_Vroomfondel  
Posted On:   Thursday, June 20, 2002 10:50 AM

you could use this little app to find out which default-property to set:




import javax.swing.*;
import java.util.*;
import java.awt.*;

public class UILister {

public UILister() {
}

public static void main(String[] args) {
UIDefaults uid=UIManager.getDefaults();
Enumeration e=uid.keys();
while(e.hasMoreElements()) {
String key=(String)e.nextElement();
Object o=UIManager.get(key);
//if(o instanceof Color) {
//System.out.println(key+":
"+((Color)o).toString()+"
");
System.out.println(key+":
"+o.toString()+"
");
//}

}
}
}
About | Sitemap | Contact