Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JeditorPane Font

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am loading a text file in the jeditorpane and then sending it to printer, But the jeditorpane is changing the font size and face. How to set the font size in jeditor pane

I tried this too .. Its not working

static {
UIDefaults uiDefaults = UIManager.getDefaults();
Font f = new Font("SansSerif", Font.PLAIN, 10);
Font font = new javax.swing.plaf.FontUIResource(f);
uiDefaults.put("JEditorPane.font", font);
}

Please assist me to change
 
Campbell Ritchie
Sheriff
Pie
Posts: 49398
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread would sit better on the Swing forum. Moving.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic