Results 1 to 5 of 5
  1. #1
    javanoobita is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default what is that method to change the size of a font in an applet?

    what is that method to change the size of a font in an applet?

  2. #2
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default

    Font font = new Font ("Serif", Font.PLAIN, 24);
    g.setFont (font);
    g.drawString("24 is the font size in the first line of code", 20, 50);

  3. #3
    javanoobita is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default

    is there any other way?

  4. #4
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default

    what like this I stole from another thread at this web site.


    Java Code:
    JLabel label = new JLabel("My Label");
    java.awt.Font font = new java.awt.Font("Dialog",Font.BOLD,14);
    label.setFont(font);

  5. #5
    javanoobita is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default

    so there is no direct command to change the size of fonts...

Similar Threads

  1. Replies: 5
    Last Post: 04-25-2009, 09:00 PM
  2. changing font size
    By diggitydoggz in forum New To Java
    Replies: 1
    Last Post: 12-25-2008, 08:48 AM
  3. How to change The Font
    By kader in forum New To Java
    Replies: 2
    Last Post: 09-15-2008, 05:09 AM
  4. Replies: 0
    Last Post: 06-25-2008, 11:33 AM
  5. how to set font size for a xml value
    By bala_kj in forum Advanced Java
    Replies: 3
    Last Post: 04-01-2008, 12:00 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
  •