About the Font Setting in Swing (Multi-Font) !!!

HI:
I want to set a new Font to JButton or JTextField....
usually, we can invoke the method of setFont(..), but I want to set different Language with different font in one Component (e.g: JButton).
For example:
English ---> Tahoma, 11
French ---> Times new roman, 14
Chinese ---> SimSun, 12
HOW TO SOLVE IT!!!

What's wrong with setFont(Font) again?
If you need a different font by locale, you just have to make sure you read the font name out of the resources instead of hard-coding it. If you need a different font for one button, setFont(Font) will work just fine by itself.

Similar Messages

  • I keep getting an error when I launch, about the registry setting being incorrect. I have reinstalled several times. Also when I try to burn a disc, it says No recorder found

    I get an error about the registry settig when I try and launch Tunes. Also when I try to burn a playlist, it says "no recorder found"

    This may help:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows
    Also try the driver section of:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • Help!!! The problem about the layout set

    I have created my own layoutset for the navigation and set it.Here is the question, I navigate from the iview for which  i have created the layout set to a new page.there is a return link on the new iview,i click the link of return the Browser go back to the frist  iview but the layoutset i have set is gone. When return from the iview how can i keep the layoutset .
    Any one know the answer please tell me ,  thx

    Hi Mike,
    Thank you very much for your help. I think itis better to choose another kind of smart sensor with rs232 I/O port. It is easier to connect the eight sensors to the eight bluetooth servers. The eight sensors are fixed on the different  bearing surfaces and rotate with the machine, it's difficult to use one turning adapter to connect them. So I have to use eight bluetooth servers to connect to the eight sensors.  
    The key problem ishould I use 8 bluetooth servers or 1 bluetooth server or the bluetooth vi of labview  to receive the data from the other servers and how can I drive them. Just like question 3 and 4 following:
    (3 key question)  I skimmed through the forum and noticed labview can support bluetooth. But I want to know that: If the bluetooth function of labview 8 can receive the data from the eight bluetooth servers on the machine  in the same time, how could I do? If not,
    should I use the same kinds of eight bluetooth servers to receive the realtime data in the same time, which are connected to pc I/O ports(if they are enough), or just use only one server connected to pc to receive the data from the servers in the same time ?
    (4 question) I noticed that the bluetooth servers should use drive software or programe. If necessary, how could I do for the eight servers on the machine and on the pc?

  • A question about the Font in JTextPane

    I added a JTextPane in a frame. When input letters in the text pane, the width of them is different. For example, a "H" is wider than "i". How can I make them have same width?
    package test;
    import java.awt.Color;
    import javax.swing.JFrame;
    import javax.swing.JTextPane;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.SimpleAttributeSet;
    import javax.swing.text.StyleConstants;
    public class TestFont {
         * @param args
        public static void main(String[] args) {
            // TODO Auto-generated method stub
            JFrame frame = new JFrame();
            JTextPane textPane = new JTextPane();
            AttributeSet as1 = new SimpleAttributeSet();
            try{
                textPane.getDocument().insertString(0, "abcabc",as1);
                textPane.getDocument().insertString(textPane.getDocument().getLength(), "\nEEE", as1);
                frame.add(textPane);
                frame.setSize(100,100);
                frame.setVisible(true);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            }catch(BadLocationException ex){
                ex.printStackTrace();
    }

    Use a monospaced font:
    textPane.setFont( new Font("monospaced", Font.PLAIN, 12) );

  • About the font of tooltips

    Hello everybody.
    I have an action on my toolbar. I want to change its font of the action.
    what can i do?
    Thanks in advance!
    Best Regards
    tanyongbin

    Hello!
    I'm interested if you've found the answers for your questions about subtitle sizes. Because I'm starting to work on this theme and trying to find material, but not so successful.
    Thank you.

  • HT201363 I cannot get the e-mail about the re-set questions and the password.

    !!!!!!

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (102564)

  • About the subform sets samples.

    I was going through the samples, and I noticed that I couldn't find the source of the data in the samples. The files used are DataA.xml and DataB.xml, however, there is no Data Connection defined anywhere, or at least I can't find it. However, if I delete the xml files, an error shows, so it's obviously using them, somehow.
    Also there is no info in the Data View tab, and when I create a new Data Connection, there is always something there.
    Thanks!.

    Yeah, I could find after some research where the data was coming from, thanks anyway.
    In a related issue I'm having, if you have any idea why would this be happening, I'd greatly appreciate it!.
    I work with a colleague that is the one in charge of assembling the final pdf documents, when I give him the xdp and the xml file, it works ok if he opens it in Designer, however, in the Adobe Livecycle process, the data is not recognized, and the document renders as if there is no data present.
    I wonder, could this happen because the preview data feature is reserved for tests only?, and I would need to pass the data in another way?.
    Thanks!.

  • I can't get the leapfrog connect to open.  It says something about the Testgen fonts.  Please help.

    I need help with the leapfrog connect application.  It won't open and it keeps saying something about the font Testgen.  Please help me if you can.

    Considering that the "Most recent updates" link on the Leapfrog Connect homepage is dated November 2009, I wouldn't hold out too much hope that your software is compatible with Lion, released in July 2011.

  • I want to use some Greek letters.  I found the font "Symbols" which  shows what I want but I cannot print in it.  I can print in all the other fonts.

    I want to use some Greek letters.  I found the font "Symbols" which  shows what I want but I cannot print in it.  I can print in all the other fonts.  What can I do?

    To type Greek, go to system preferences/language & text/input sources and check the box for Greek, plus the box for Show Input Menu in Menu Bar, plus the box for Keyboard Viewer.  The select Greek from the "flag" menu at the top right of the screen and type.  Select Keyboard Viewer from the same menu to see which key does what.  Do not worry about the font, that is taken care of automatically.

  • My browser is Firefox, my email program is Yahoo, when composing a new email, how would you increase the font of size of the characters?

    I am using Firefox browser, My email program is Yahoo.com and my Home page is Yahoo. My OS is Windows XP. When composing an email I sometimes want to increase the print size of the text in the email. I do not know the procedure to do this. Is sometimes prints very small.
    there some way that I can correct this problem?
    Thank you,
    Jeanette Gonzales

    Hi [email protected],
    If you are talking about the font only in your email, then that's a yahoo issue:
    http://help.yahoo.com/l/us/yahoo/mail/ymail/basics/basics-21.html
    If you think EVERYTHING is too small, you can try using [https://support.mozilla.org/en-US/kb/how-do-i-use-zoom Zoom]. This will increase/decrease the size of everything on the page. You can try hitting ''CTRL and +'' a few times to try it out. ''CTRL and 0'' will return it to normal size.
    If that isn't what you are looking for you, you might want to look into some of the [[Accessibility]] options. There is lots of good information in that article.
    Hopefully this helps!

  • Use Windows Display Setting to enlarge the font size

    Hi,
    I'm using JDK1.4.1 on Windows2000. I wrote a Swing app that used native Windows LookAndFeel.
    I'm wondering if I can use the Windows Control Panel->Display->Settings to adjust the font type and size for the Swing app. I tried it but failed.
    So are the font type and font size in Java App adjustable only through programing APIs?
    thanks,
    Richard

    So are the font type and font size in Java App adjustable only through programing APIs?Yes. WindowsLookAndFeel doesn't see any Windows native font settings.
    But I think there's a way to do so (Although I have no experience about
    that). Here's some hints...
    Get the font settings from Windows by using JNI, and set these fonts
    to UIManager like this.
    UIManager.getDefaults().put("Button.font", new Font("Dialog", 0, 20));
    (Try this code and you will see the Button-font changes).

  • How do I set the font in firefox 4.0 using ubuntu?

    The zoom feature is OK but I want to permanently set the font size on my firefox pages using the Ubuntu operating system. I don't see anything under Tools and there doesn't seem to be a lot of questions previously asked in the Help area about Firefox in Ubuntu.

    It's difficult to set a single font size without wrecking the display of most web sites. One alternative would be to store your preferred zoom level and apply that to all sites. This requires an add-on such as:
    * [https://addons.mozilla.org/en-US/firefox/addon/6965/ Default FullZoom Level]
    * [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint]
    Does that work for you?

  • Formatting issues: when I open a msg, the font is sooo small you need a magnifier to read it. How can I set the font size to one I can easily read?

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I have various formatting issues:
    a. When I open a msg from my web browser (Cablevision), the font is sooo small I need a magnifier to read it. How can I set the font to a size I can easily read?
    b. When I forward msgs, the text gets all distorted and I need to clean it up (some symbols, lots of spaces between words). How can this be fixed?
    c. When I want to tell someone about a website, I cannot type the URL in so that all they have to do is click on it. How can this be fixed?
    d. When I open messages, the text opens in a small window and covers the "Show Images" button. Why?
    == This happened
    ==
    Every time Firefox opened
    == Ever since I started using Firefox (a few months ago)
    ==
    '''Troubleshooting information'''
    I didn't find any results
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows 7
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
    == Plugins installed
    ==
    *-nphpclipbook
    *Office Plugin for Netscape Navigator
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *Default Plug-in
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.2"
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *The Hulu Desktop Plugin allows Hulu.com to integrate with the Hulu Desktop application.
    *Shockwave Flash 10.0 r45
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *iTunes Detector Plug-in
    *3.0.40624.0
    *NPWLPG
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers

    The text editor is the text area that you use on the webmail (Yahoo, Hotmail) website to create a new mail.
    You can compare that with the ''Post new message'' text area that you use to create a new post on this forum.
    Just above the text area that you use to enter the message text there is usually a button bar with buttons that allows some text formatting like Bold and Italic and can also include a button to make a clickable hyperlink.
    Check the tooltip of each button by hovering with the mouse over each button.
    Make Link - https://addons.mozilla.org/firefox/addon/142

  • I am not satisfied with the font and size of print that I set. How do I change it?

    When I first set up Firefox on my desktop, I set the print size and font. I have found that it is too large and I really would like to change the font, also. I can't find a spot to do that. I might be looking right at it but don't realize it. Could you help me?

    I can't remember what I did when I set the font and size of articles that I printed from the pages on Firefox. I just know that I tried something a few months ago and have not been happy with the settings that I made. I can't find anywhere to change those settings and have tried so many things but they do not change the look of the pages I print when I click print. I tried to see if I could change the settings but all it does is change portrait or landscape and margins...nothing about fonts or sizes. I am getting so frustrated even though I love Firefox.

  • "xorg-fonts-alias" is not in the package set

    I was trying to install xorg onto an arch box, ran pacman -S xorg; it gave me 22M of files to install, I told it yes, and it started spraying errors about files not found, file sizes not found, something like that.
    I tried a couple more times and it finally downloaded the files, but then complained that a couple files were corrupt.
    I went to /var/lib/pacman/current and deleted the entries for those files.
    Now when I try to install xorg, it tells me that it cannot resolve dependencies for xorg-fonts-misc, because xorg-fonts-alias is not in the package set.  If I try to pacman -S xorg-fonts-alias, I get an error that it isn't found in the sync db
    How do I fix whatever I broke?

    I would probably try cleaning out my cache, and then forcing the stuff that is complaining (depending on what the errors are of course):
    $ sudo pacman -Scc
    $ suco pacman -Syuf

Maybe you are looking for