• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Changing the font size of iorder

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic