• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the font size of iorder  RSS feed

 
Shyam Purkayastha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
I have a problem related to the TitledBorder.When we draw a titled border in a component it takes some space inside the component.In my case it is messing up the painting of my custom component because the font size of the titledborder is quite big.
I want to know is it possible to reduce the size of the font of titledborder and how.
thanks
shyam
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it is messing up the custom painting of your component make sure you take the Insets of the component into account in your painting routine...
 
Ashish Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shyam,
use
UIDefaults uid = UIManager.getDefaults();
uid.put("TitleBorder.font", new FontUIResource("Arial Unicode MS", Font.PLAIN, 10));
NOTE :- that the the property is put in UIManager's default table and not in UIManager directly. Also note that FontUIResource is used and not Font obj
There r few issues re. this i'll better post that in other thread (sorry i forgot the thread name) our other listmate A$HI$H (not me ) wanna know how to handle theme related issues.
well i'll post perhaps Monday night cause u know Cricket fever is going on.
 
Ashish Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shyam,
the property key should be :- "TitledBorder.font"
Sorry for this. Well i posted it in late night that's why...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!