How to use different fonts in java

i want to use some other font,what should i do to use a different font??? thanks in advance

Hi,
Use the function below for the component you want to change the font.
setFont
public void setFont(Font f)
Sets the Font of this object.
Parameters:
f - the new Font for the object
Hope this helps
Roopasri Vittal
Developer Technical Support
Sun Microsystems
http://sun.com/developers/support

Similar Messages

  • JTree how to use different font's color for different node

    Hi all
    This is the first time I am using JTree in my application and I have got some problems with it that I can't work out after reading the Java tutorial. Please help!
    1. For some nodes, the font color need to be different.
    2. One node need to use more than one font type for example "This is a sample " some words need to be bolded.
    Kind regards
    Edmond

    Did you read the section on [url http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#display]Customizing a Tree's Display?
    And did you follow the link on renderers?

  • How to use different font sizes in smart from?

    Hi Gurus,
         I'm creating a form and i am trying to place a title with font size around 50, and i tried creating a paragraph type with a font of this size in smart styles, the problem is when i am editing the text node, the font size appears to be right, but when i print it, the font gets much smaller, can anyone help on this?
    I have created SMART STYLE as YSMART.
    Header---- H4 ( For Main Headings)
    Paragraph -
    H1 (Table Headings)
    H2 ( Label Headings)
    H3 ( Label Values)
    H4 ( Main Headings)
    I have given H4 as Header font in smart style.  
    Thanks In Advance..!
    Edited by: sreelakshmi.B on Jun 25, 2010 10:07 AM

    HI ,
    Just check with your smart styles with assigned  paragraph  allignment   .
    Try to create character style  with your required  font ,size and  Allignment  .
    Hope u this will solve your issue  .
    Let me know if any concerns......
    Regards,
    Lokesh

  • How to use different font styles in the same boolean text?

    Hi all,
    As reported here http://digital.ni.com/public.nsf/allkb/6BD344ACA4DEE20A8625692700737E16, it is possible to change font color, size or other font properties of a subtext in a string indicator. This can be applied to a caption too.
    I'd like to apply this properties to a boolean text but it does not work. The boolean control has the Text.selectionStart and End property node but it does not appear to function.
    Can you help me?
    Thanks all

    This is a bug in the development environment (I think it showed up around LV8).
    There's a workaround, but it seems to work intermittently: Place some floating text on your front panel, then edit it's font styles.  Select and copy the floating text.  Select the boolean text (double click on it).  Paste.

  • How to use MICR fonts in Adobe forms (webdynpro java

    Hi,
          We have a requirement where we need to print some MICR codes (for checks) through Adobe Forms.
    I have installed some true type MICR fonts in windows and Adobe Font Manager (in ADS) as well.
    It is visible in the Adobe Form design time (Font palette) and when I use the font for text, it is visible in preview too. But when I run the web dynpro application, in the online form it is converted into Standard font (Times new Roman).
    Is there anyway to handle this issue.
    Please let me know.
    I am using NWDS 7.0.1
    Adobe Live cycle designer 7.1
    SAP NW 2004s SP14
    Thank you,
    Vasu

    Check this forum post (though that is for 6i, it would be of helpful for you)
    How to use unicode fonts in Oracle forms 10g?
    -Arun

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • How to use OCR Font A type by the time of writing some text into Pdf fil

    Hi,
    I am generating one pdf file in java. How can I use OCR Font A for text of pdf file ..Please can any one help where can I get OCR Font A and how to use that one in java ... I want to write some text into pdf file and that text should use OCR Font A family ...
    Thanks.

    This document shows how to disable OCR during conversion; just do the opposite: https://forums.adobe.com/docs/DOC-3062

  • How to use unicode font in J2ME

    Hi,
    I want to create some mobile application using Unicode Font in J2ME.
    Please help me about how to use Unicode Font in J2ME and how to configure Unicode Font in J2ME SDK 3.0 Early Access

    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=2&t=001235
    http://www.linuxforum.net/chinese/develop/java.html
    Hope its of help to you.

  • Using different fonts

    Whe I edit a form, how can i use different font and chance once for all form?

    Select all the fields, then right-click one of them and go to Properties and change that option. It will be applied to all selected fields.
    Then you can right-click one of them and select "Use current properties as new defaults" so that new fields you create will have that font already selected for them.

  • How to use different page scapes in smartforms

    hi
    How to use different page scapes in smartforms.
    I want Potrait format in the 1st page and Lanscape format in 2nd page is it possible if so plz suggest me an idea

    Hi,
    It is possible in smart forms, but not in scripts.
    we can have 3 tabbed options for pages in smart forms.
    <b>General...
    Output options
    Conditions</b>.
    In <b>output options</b> u can define whether a page can portrait or land scape in <b>print attributes</b>.
    Reward if helpful.
    Regards,
    Sandhya

  • How to use unicode fonts in Oracle forms 10g?

    Hi I am working in forms 10g for quite a long time, the software that I have developed so far are all in English language. Now I have requirements to use Bengali Fonts in Forms 10g. I am facing difficulties doing that. Please reply with help. Thanks
    Hasan Al Mamun

    Check this forum post (though that is for 6i, it would be of helpful for you)
    How to use unicode fonts in Oracle forms 10g?
    -Arun

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How to use Google Fonts in email?

    Hi,
    I would like to know how I use google fonts in my emails.
    We're using the ubuntu font and I see the fonts on my computer but after sending an email the fonts change.
    I'm using the addon SmartTemplate4.
    Hope any f you know the answer!
    Thanks in advance

    Several online resources point to these two articles at Campaign Monitor:
    * [https://www.campaignmonitor.com/blog/post/3897/using-web-fonts-in-email Using web fonts in email] (Dec. 2012)
    * [https://www.campaignmonitor.com/resources/will-it-work/webfonts/ Web Fonts] (permanent resource)
    The first link provides examples on how to do this, while the second one has informaiton about email client support & compatibility with this feature.
    Keep in mind using web fonts will have a limited effect if viewing such emails while offline.
    [http://kb.mozillazine.org/Default_HTML_font_for_new_messages_-_Thunderbird This older MozillaZine article] also has information about fonts use in Thunderbird. In my experience in most cases the receiving party will have to have the fonts locally installed for the best results.

  • How to use C-Structure in java applets

    hi alls,
    I want to use a struct model (struct in C++) in java applets. i know class is used in java applications. but, how can i convert in java applets?
    class renk
    int r;
    int gr;
    int b;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.Event;
    import java.applet.Applet;
    public class benek extends Applet
    final int n=10;
    int x[] = new int[n];
    int y[] = new int[n];
    int count = 0;
    renk clr[] = new renk[n];
    public void init()
    setBackground(Color.black);
    public boolean mouseDown(Event yordam, int xyer, int yyer)
    if (count<n)
    System.out.println("...");
    ekle(xyer,yyer);
    else System.out.println("Kapasite Doldu...");
    return true;
    void ekle(int xyer, int yyer)
    int r1 = (int)Math.floor(Math.random()*256);
    int gr1 = (int)Math.floor(Math.random()*256);
    int b1 = (int)Math.floor(Math.random()*256);
    clr[count].r = r1;
    clr[count].gr = gr1;
    clr[count].b = b1;
    x[count]=xyer;
    y[count]=yyer;
    count++;
    repaint();
    public void paint(Graphics g)
    it gives error message... how can � use struct model in java applets???
    if you help me i will be greatfull....

    � use import but it doesn't work.
    i add: import renk; or import class renk;
    how will � add import I assumed based on your initial post that the renk and benek classes were in the same file. Apparently you're saying they are not. So for another thing, make your renk class "public class renk", and add the "public" keyword to the 3 members of that class. Then if your code still doesn't see the "renk" class, it would just be that you don't have the directory that contains the compiled "renk.class" in your classpath.

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

Maybe you are looking for

  • How I can format my MacBook Pro 2012 without loosing anything

    Since a couple of months I am noticing that my laptop is getting slower on booting   Plus when I am doing  repair disk it stating that I need to do it from recovery & once I scan it  from recovery it will not find any error. I think it's time to refo

  • HT204135 what can I do about the "the printer is busy" message?

    Looks like is a problem to use some printers with 10.7.4. "The printer is busy" message is show after I "re-dowload" the proper printer drive from Canon (I have a IR-ADV C7055 Canon printer). Any help? Salta 520

  • Is there a user exit in idoc_inbound_asynchronous

    Hi , I want to change some data in a segment of the idoc before it is posted in SAP. I would like to know if there is a user exit in FM idoc_inbound_asynchronous which i can use for ths. Regards Rajesh

  • Why can't iTunes play .flac files?

    You'd think in this day and age a company like Apple would mature and get over its snobbery about playing generic audio formats in iTunes. So whats the story Apple, why are your latest products still incapable of playing such a generic audio format?

  • Move Tool Problem

    Why did the Move tool in Photoshop Elements 8 stop resizing on earlier selected photos? It suddenly only resizes the last selected photo.