• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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...
 
rubbery bacon. crispy tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic