DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    15

    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 :

    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
    Posts
    15
    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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links