Swing: Changing the font face

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Swing: Changing the font face

  1. #1
    Join Date
    May 2006

    Swing: Changing the font face

    Hi! i'm doing a print function in swing....
    i've some problem with changing the font style to be smaller or to another font type...can anyone give me some idea...here's the code :

    	g2.drawString(lblTitle.getText(), 0, fontHeight);
        	g2.drawString("Checked by :", 0, (int)pageHeight-55);
        	g2.drawString("................", 90, (int)pageHeight-55);
    i want the size of the string to be smaller than the current size..how?

  2. #2
    Join Date
    May 2006
    horey...I've already got the solution...i use Graphics.setFont()

Similar Threads

  1. Replies: 1
    Last Post: 05-03-2006, 04:00 AM
  2. Initializing font in JTextPane
    By doubleoseven in forum Java
    Replies: 2
    Last Post: 04-18-2006, 08:50 AM
  3. Let's face it, Swing's real problem isn't really performance...
    By drhender in forum Talk to the Editors
    Replies: 1
    Last Post: 09-16-2002, 06:36 PM
  4. Font Installation (programmatically)
    By Gwyn Lail, II in forum VB Classic
    Replies: 1
    Last Post: 06-28-2002, 07:21 PM
  5. Replies: 2
    Last Post: 09-26-2000, 11:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center