• 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

how to increase font of JLabel

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey i know how to create JLabel but i dont know how to increase font in JLabel please help me by providing a method thank you very much
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) get the current Font using getFont.
2) get a copy with an increased size using Font.deriveFont.
3) set the Font using setFont.
 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:1) get the current Font using getFont.
2) get a copy with an increased size using Font.deriveFont.
3) set the Font using setFont.



replied you sir and i post request too

n i didnt get these points can you provide some short code thanks for helping me out
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sagar khana wrote:n i didnt get these points


Did you read the API for the methods Rob mentioned? namely Component#getFont(), Font#deriveFont(...) and Component#setFont(...)

sagar khana wrote:can you provide some short code thanks for helping me out


Please read this section of How To Ask Questions On Java Ranch. Then try it yourself and ask a specific question if you don't get the desired result.
 
sagar khana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

sagar khana wrote:n i didnt get these points


Did you read the API for the methods Rob mentioned? namely Component#getFont(), Font#deriveFont(...) and Component#setFont(...)

sagar khana wrote:can you provide some short code thanks for helping me out


Please read this section of How To Ask Questions On Java Ranch. Then try it yourself and ask a specific question if you don't get the desired result.



ok
 
reply
    Bookmark Topic Watch Topic
  • New Topic