How do i edit the font size of a String?

hi.. im a student in programming this yr.. i wan to edit the font size of a String.. how can i do that? i only know that there is setFont.. can anyone help me?

import java.awt.*;
import javax.swing.*;
public class EditFontSize extends JFrame {
    public EditFontSize() {
        initComponents();
    private void initComponents() {
        jPanel1 = new JPanel();
        jLabel2 = new JLabel();
        jLabel3 = new JLabel();
        jLabel4 = new JLabel();
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setTitle("Edit the font size ");
        jLabel2.setFont(new Font("Dialog", 0, 14));
        jLabel2.setText("Test");
        jPanel1.add(jLabel2);
        jLabel3.setFont(new Font("Dialog", 0, 18));
        jLabel3.setText("Test");
        jPanel1.add(jLabel3);
        jLabel4.setFont(new Font("Dialog", 0, 24));
        jLabel4.setText("Test");
        jPanel1.add(jLabel4);
        getContentPane().add(jPanel1, BorderLayout.CENTER);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-273)/2, (screenSize.height-118)/2, 273, 118);
    public static void main(String args[]) {new EditFontSize().setVisible(true);}
    private JLabel jLabel2;
    private JLabel jLabel3;
    private JLabel jLabel4;
    private JPanel jPanel1;
}

Similar Messages

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • How can I adjust the font size of my printouts?

    I have an HP Officejet 4500 all-in-one printer and a new HP pavilion Slimline computer.  Since I changed to this computer, my printouts have very small font size making them hard to read.  How can I adjust the font size of the printout?  Is it a computer or printer function? I appreciate the help.

    I, too, am frustrated.  This seems like something that would easily be handled within the application software.  However, none of the fixes I've been offered have been very helpful.  My cousin sugested using Control C and Control V to move the text to WORD.  Once in WORD, you can manipulate the text on a WORD page...sometimes.  I've had good and bad luck with this method.  It still requires working in two different programs to get it legible.  Does anyone else have a 4500  All-in -one with this problem, or is it only me?  Thanks,  [Edited for Personal Information]

  • How do you adjust the font size for the tabs and icons around the screen?

    How do  you adjust the font size of tabs and and icons to ake them larger?

    sfcalling
    Click on the text in the menu so that you see the bounding box around it. Look to the right of the Movie Menu customization workspace, Adjustments Palette, Text and edit your text font style and size.
    In this screenshot, "Glass Flowers" text in the main menu is selected and its Adjustments Palette Text editing opportunities are shown. To do comparable editing in the scene menu, click on the scene menu in the bin to bring its image up to the screen.
    Please let us know if you are OK with the details.
    Please also review the following Adobe document on disc menus which applies to both version 11 and 12.
    Adobe Premiere Elements 11 * Creating disc menus
    By the way, what computer operating system is your Premiere Elements 12 running on?
    Thanks.
    ATR

  • How can I increase the font size of my email when I print it out, it is printing tiny

    How can I increase the font size when I print out emails, it is printing tiny size?

    In the Print dialog window, click the small reveal-button to the right of the printer's name -
    The window will expand to show additional settings (similar to 'old' Page Setup) -
    Be sure "Scale:" is set to 100% and the 'Keep apparent font size' item is checked.

  • How do I increase the font size in my email and maintain resolution.

    Hi folks. Mr Newbie is seeking some help, I hope it is relatively straight forward, thanks
    How do I increase the font size in my standard email and document views without losing resolution.  Right now my font size in email, headers and text is less than that on my iPhone, it rather defeats the point of having a 27" screen if most of it is blank and I have to sit with my nose to the screen to read email.  Thanks for your help, once you have stopped laughing.  C

    Two things you can do to easily aid with readability in Mail are as follows:
    1) Increase the size of folders in the sidebar:
    a) select "system preferences" from the Apple menu
    b) select "general settings"
    c) select small, medium or large under "sidebar icon size"
    2) Increase the text in the main body of the email (both sent and received):
    a) select "preferences" from the Mail menu
    b) select "fonts and colors"
    c) adjust font size for "message list font" and "message font".  I have noticed this works properly while in classic mode, but in regular mode the message list font doesn't appear to change size.
    Select classic mode by accessing Mail preferences and selecting the "viewing" tab.
    Another shortcut is to right click on the toolbar, then select "customize toolbar", and then drag the "smaller / bigger" buttons onto the toolbar.  Now you can decrease and increase font size as desired on the fly.

  • How do I change the font size of a document when I PRINT?

    How to I change the font size of a document when I print it?

    To specifically and fully answer your question, no, you absolutely cannot change the “font size” as a function of print.
    First of all, there isn't a single “font size” associated with a PDF file (and we assume you are referring to a PDF file since this is an Acrobat forum).
    Secondly, PDF is a final form file format meaning that the content is static in terms of location, size, etc. on the page. To change the point size of any particular text, you really need to go back to the source document and make the changes there.
              - Dov

  • How can I adjust the font size in iTunes 11?

    How can I adjust the font size in iTunes 11?  Specifically, when in Artist view both the text in the sidebar and the track listing are huge.

    How to change fontsize in iTunes
    Take an XML-Editor and open:
    "C:\Program Files (x86)\iTunes\iTunes.Resources\de.lproj\TextStyles.plist"
    For other languages change your country code (de, en, fr, pl ...).
    Example for english:  "\en.lproj\TextStyles.plist".
    Backup this File !!!
    To change the Text-Size, change the integer value of the following item:
    "<key>size</key>"
    "<integer>8</integer>"
    This means Text-Size 8
    "<key>size</key>"
    "<integer>12</integer>"
    This means Text-Size 12
    To change the font, change the integer value of the following item:
    <key>font</key>
    <string>Arial</string>
    This means the font changes to Arial
    This also works:
    <key>italic</key>
    <true/>
    <key>bold</key>
    <true/>
    <key>underline</key>
    <true/>
    Example of common Text Properties:
    <!-- Artist View, Text Size In Artist List , Unselected -->
      <key>1033</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View, Text Size In Artist List, Selected -->
      <key>1034</key>
      <dict>
            <key>- loc hint -</key>
            <string>item table cell 3 (bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Album View Text Size, Titles Of Track List, After Click On Album -->
        <key>1021</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 1</string>
            <key>font</key>
            <string>Segoe UI Semibold</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Artist View Text Size, Titels Of Track List -->
        <key>1022</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Track Number Size, In Album And Artist View -->
        <key>1023</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 3</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>justification</key>
            <string>right</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
      <!-- Artist Text Size, In Album And Artist View -->
        <key>1024</key>
        <dict>
            <key>- loc hint -</key>
            <string>item track list 4</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>9</integer>
        </dict>
    <!-- Album View Text Size, Title Of Album Under The Cover -->
        <key>1001</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 1</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
      <!-- Album View Text Size, Artist Under The Cover -->
        <key>1002</key>
        <dict>
            <key>- loc hint -</key>
            <string>item grid 2</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Titleview Textsize In Table -->
        <key>9002</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small)</string>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>8</integer>
        </dict>
    <!-- Title View Text Size, Title Of Album Next To Cover -->
        <key>9029</key>
        <dict>
            <key>- loc hint -</key>
            <string>List Contents (Small Bold)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>5</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Selected -->
        <key>1307</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font (selected)</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>3</integer>
        </dict>
    <!-- Textsize Playlist Sidebar Left Unselected -->
        <key>1304</key>
        <dict>
            <key>- loc hint -</key>
            <string>playlists outline small font</string>
            <key>bold</key>
            <true/>
            <key>font</key>
            <string>Segoe UI</string>
            <key>size</key>
            <integer>7</integer>
        </dict>
    Hope this helps.

  • How do i increase the font size on my macbook air

    how do i increase the font size on my macbook air

    Unfortunately Apple hasn't yet given us a resolution independant OS yet so there are two solutions: 1) poor and 2) sad. You can open System Preferences and select a lower resolution in the Displays tab. The result is a larger font which is slightly fuzzy. Or you can change the default font size or magnification in each program (that allows this). Unfortunately many programs don't allow it.
    This problem (and my aging eyes) are why my next Mac notebook will be retina. They scale to other resolutions better than the Air does.

  • How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?

    How do you increase the font size to bigger than 24, using the typewriter tool in Adobe Acrobat Pro 9 for Mac?   Often I just want to label an item on a map that is in PDF and want to use a simple label rather than a Text Box for labeling, but have yet to find a way to increase the font size beyond 24.   Can someone help me with this? - JML

    Read this:
    https://forums.adobe.com/thread/1468782?sr=stream&ru=2382437

  • How can we increase the font size in Adobe Bridge CC 2014?

    How can we increase the font size in Adobe Bridge CC 2014?
    We use Windows 7 64bit computers and Dell High Density UltraSharp UP2414Q monitors with a resolution of 3840 x 2160.
    Other applications in Adobe CC 2014 work fine with this high resolution (Indesign, Photoshop) but I can't find where to adjust font size in Bridge.
    Right now menu items are hardly ledgible.

    Same problem.  Bridge is unusable with this micro font and no way to change it.
    I would call tech support but I don't feel like being on hold for two hours to talk to someone Adobe pays pennies a day in a loud call center who won't be able to help anyway. Fail.

  • How do I change the font size and color in a text box?

    How do I change the font size and color in a text box?

    Really frustrating to find the first time but simple once you figure it out. I think I spent hours trying to find this. Simply right click on a blank spot in the toolbar up top and select Properties Bar. There it is! The available properties will change depending on whether you have the content (text) selected or the box itself.
    I haven't found a way yet to make it show up as a regular part of the toolbar. It floats around and gets in the way so I don't leave it on and then have to open it again when I need it. Again - frustrating; but at least it's there!

  • How do you change the font size?

    This is a rather simple question.
    How do you change the font size in flex builder 2?
    In the preferences for flex>editors there is no option to
    change any font settings.
    i'm sitting quite far away from my LCD and can hardly make
    out the text.

    Window -> Preferences -> General ->Colors and
    fonts

  • How do I change the font size in iPod touch with iOS 6.1.3?Thanks

    How do I change the font size in iPod touch with iOS 6.1.3?Thanks

    I have an custom app that I want to change the size of the fonts cause the app font size is too long so i cannot see the whole sentence. thanks.

  • How do you get the font size back to normal on a website?

    The size of my fonts on my hotmail acct are tiny. Don't know how it happened, & I can't get it back. Using the "Tools" menu, to attempt to change fonts, changes it for all sites. How do I change the font size back for just one website? Can anyone help?

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

Maybe you are looking for

  • URGENT: Can (no) Fan tray in a 6509 cause power problems?

    All, I'm about to install a 6509-E with two 10/100/1000 Blades and two SUP2's (running cat6000-sup2k9.8-1-3.bin) They're all brand new. With the Enhanced chassis they ordered the wrong fan tray and as I write a courier is bringing over the correct Fa

  • [REQ] Assisted management tools/methods for planshierarchies (imp/expor

    Hi, I'm looking for cross-projects investigation tools, to provide graphical understanding and management of forté source code. Viewing/updating plans dependencies, as well as managing external APIs calls are my requirements. In order to manage inter

  • Spinning Wheel, force quit, then all contacts lost (twice)

    Twice today I've lost all my contacts from Address book. First, the spinning wheel comes. Then, after an hour, I force quit either address book, or Mail and upon reopen, all is lost. What's the issue? How can I stop this from happening again? Thanks.

  • Migration Assistant Problem Tiger to Tiger

    I want to move the contents of a Macbook 1.83 GHz Intel Core Duo OS 10.6.8 to an iMac 2 GHZ Intel Core Duo OS 10.6.8. I ran a migration with a new User name on the iMac that was differentfrom the User name on the Macbook. The old user name had no con

  • Can't get Entourage calendar to sync with new iTouch

    I am trying to Sync my Entourage calendar from my Mac to my new iTouch. I've marked the Entourage box in iTunes Info but that just seems to bring up an Entourage file inside of iCal which I never use and seems to be corrupted with random and massivel