Bold font in Labels?

I have declared this:
Font font = new Font("Times", Font.BOLD, 15);
But when i do this:
label1.setFont(Font.font);
The font does not appear in Bold Times font with a size of 15. The aim is that when the text in label1 changes, it should always be the same font, bold and size.
Ie. On first load, the text 'Welcome XYZ' appears in Panel1 - I want this in bold font. [In the game of Deal Or No Deal] when the banker makes an offer, the text changes to "XYZ, the banker offers you �abc" - but this should also be in Times, bold, size 15.
What am I doing wrong that is stopping this from working? I'm given a 'cannot find symbol' error, with the Symbol being 'Variable font'.
Thanks:)

Font font = new Font("Times", Font.BOLD, 15);The variable you created is named simply 'font'.
label1.setFont(Font.font);How about:
label1.setFont(font);
I predict many more pain points for you though.

Similar Messages

  • How to set the font of label in ColumnChart correctly?

    hello, everybody
    By flex sdk 4.1.0, 4.5.1,
    the same source but two effects of font of label of ColumnChart will be displayed.
    .mxml:
    <!-- mxml start -->
    <?xml version="1.0" encoding="utf-8"?>
    <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       width="100%" height="100%"
                       styleName="backgroundChart" xmlns:local="*" xmlns:common="common.*">
        <fx:Declarations>
            <s:SolidColorStroke id="white" weight="1" color="#CCCCCC"/>
        </fx:Declarations>
        <s:Label text="" id="titleLabel" textAlign="left" styleName="graphLabel" x="10" y="10" width="100%" height="40" visible="true"/>
        <mx:Legend id="ch01Legend" direction="horizontal" dataProvider="{mainChart}" height="100%" width="100%" x="30" y="30" styleName="myLegend1"/>
        <!-- Define custom Strokes. -->
        <mx:ColumnChart id="mainChart" showDataTips="true" x="20" y="60" width="100%" height="100%" dataTipFunction="dataTip">
            <mx:backgroundElements>
                <mx:GridLines horizontalChangeCount="1" gridDirection="horizontal">
                    <mx:horizontalStroke>{white}</mx:horizontalStroke>
                </mx:GridLines>
            </mx:backgroundElements>
            <mx:verticalAxisRenderers>
                <mx:AxisRenderer axis="{linearAxis}" showLine="true" showLabels="true" styleName="myAxisStyle1">
                    <mx:axisStroke>{white}</mx:axisStroke>
                </mx:AxisRenderer>
            </mx:verticalAxisRenderers>
            <mx:verticalAxis>
                <mx:LinearAxis id="linearAxis"
                               minimum="0"
                               autoAdjust="true"
                               title="Unit"
                               />
            </mx:verticalAxis>
            <mx:horizontalAxisRenderers>
                <mx:AxisRenderer id="horizonLabel" labelRotation="45" axis="{ch01_a2}" showLine="true" showLabels="true" styleName="myAxisStyle3">
                    <mx:axisStroke>{white}</mx:axisStroke>
                </mx:AxisRenderer>
            </mx:horizontalAxisRenderers>
            <mx:horizontalAxis>
                <mx:CategoryAxis id="ch01_a2"
                                 dataProvider="{mainChart}"
                                 title="Period"
                                 categoryField="Period"
                                 />               
            </mx:horizontalAxis>
        </mx:ColumnChart>
    </s:BorderContainer>
    <!-- mxml end -->
    .css
    <!-- css start -->
    .myAxisStyle1 {
        placement:bottom;
        minorTickPlacement:none;
        tickLength:5;
        tickPlacement:none;
        color:#FFFFFF;
        verticalAxisTitleAlignment:vertical;
        fontFamily: Arial_AFE;
    .myAxisStyle3 {
        placement:bottom;
        minorTickPlacement:inside;
        tickLength:5;
        tickPlacement:inside;
        color:#FFFFFF;
        fontFamily: Arial_AFE;
    @font-face {
        src:url("font/arial.ttf");
        fontFamily: Arial_AFE;
        embedAsCFF: false;
    <!-- css end -->
    environment:
    flex sdks->4.1.0
    chart image:
    the font looks like "Arial"
    environment:
    flex sdks->4.5.1
    chart image:
    the font looks like "Times New Roman"
    Working at flex sdks 4.5.1,
    the labelClass can be set to 'spark.components.Label'(defalut) or 'mx.controls.Label',
    it seems that we can set labelClass to mx.controls.Label to get the same effect of font of label in ColumnChart when flex sdks->4.5.1
                <mx:AxisRenderer axis="{linearAxis}" showLine="true" showLabels="true" styleName="myAxisStyle1" labelClass="mx.controls.Label">
                <mx:AxisRenderer id="horizonLabel" labelRotation="45" axis="{ch01_a2}" showLine="true" showLabels="true" styleName="myAxisStyle3" labelClass="mx.controls.Label">
    but it also causes a memory leak.
    1) Can anyone tell me how to show the font of label of ColumnChart correctly (looks like "Arial") when using the labelClass 'spark.components.Label' ?
    2) Can anyone tell me how to solve the memory leak when using the labelClass 'mx.controls.Label'?

    Hi,
    for combobox in a table (I assume the combobox is shown un column 2, thus the index 1)
    oracle.jbo.uicli.jui.JUTableLOVEditor lovCellEditor = (oracle.jbo.uicli.jui.JUTableLOVEditor) jTable1.getColumnModel().getColumn(1).getCellEditor();
    lovCellEditor.getComponent().setFont(new Font("Arial",Font.BOLD,13));
    For the LOV panel this is a bit more complicated because you need to create a custom LOV panel as described in http://www.oracle.com/technology/products/jdev/howtos/10g/jclientlov/customadfjclientlovpanel.html
    I filed a bug today to expose the component on a LOV to public so they can be modified
    Frank

  • How can I prevent sites displaying in bold font in versions of FF later than 3.6?

    Many sites (google, gmail, wikipedia to name a few) are appearing in bold font when they should not be. This started for me in FF4, and has persisted in FF5 and now FF6. I'm running Windows 7 x64.
    I've seen many replies to questions about bold font problems telling people to reinstall, e.g. arial as the problem is corrupted fonts on their system. I've tried reinstalling several fonts (arial, verdana, tahoma, times new roman...) and it doesn't solve the problem. Also, if I reinstall FF3.6, the problem goes away, so it seems to be an issue with FF and not my machine.
    I've also tried running FF6 in safe mode, with addons disabled, and restoring the default settings. None of this has helped.
    I should add that I have another machine running FF6 with the same addons, but with Windows 7 x86 - all pages display correctly. Is this a known issue for FF4+ on 64-bit systems?

    Thanks for replying. I'm using exactly the same profile as I did in 3.6, and reinstalling 3.6 does solve the problem. I'd rather use the latest version though.
    I've just checked Tools > Options > Content > Advanced of the two machines side by side, and they're identical. The 32-bit one is fine, and the 64-bit one isn't.

  • I'm using the @font face to embed fonts on my site. Everytime I use a heading tag Firefox adds extra emphasis (making a bold font even bolder). How can I resolve this? The heading tag renders fine in Chrome/Safari.

    <pre><nowiki><?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <link rel="stylesheet" type="text/css" href="index/fonts/fonts.css"/>
    </head>
    <body>
    <h1>Heading2</h1>
    <p> Testing </p>
    </body>
    </html>
    */CSS/*
    */Fontface rule/*
    @font-face {font-family: 'Gibson-Bold';src: url('159693_2.eot');src: url('159693_2.eot?#iefix') format('embedded-opentype'),url('159693_2.woff') format('woff'),url('159693_2.ttf') format('truetype'),url('159693_2.svg#wf') format('svg');
    */Testing use of Fontface/*
    h1, h2, h3, h4, h5, h6 {
    font-family: Gibson-Bold;
    font-style: normal;
    font-size: 10pt;</nowiki></pre>

    You're welcome.
    It is always a good idea to reload and bypass the cache after you have made changes and uploaded new files.
    Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • How can i take out the bold fonts from webpage?

    Hello,
    My website homepage is all in bold fonts and after trying everything i thought to solve the problem, i cant find a way to un-bold the font.
    This the page i am referring  http://silentdisco.de/
    Hope you could help... I have this situation for some time and i really dont know what i could do to solve it.
    Thanks so much in advance for your help.
    xiko

    Start by removing the inline styles from your HTML code.  You've got quite a few of them.
    <span style="font-weight: bold; color: #000000; font-size: 20px;"></span>
    CSS styles belong in your style sheet.
    Nancy O.

  • Pdf file designed using IREPORT tool. when i preview in adobe reader bold fonts displaying correctly,but same file in mozilla adobe plugin displays fonts unbold

    I have designed a report using IReport tool with some text as BOLD, which generates report in PDF format. when i open the file with Adobe Reader IX it opens perfectly.
    but the problem is when i open the same file in mozilla add-on "Adobe Reader 11.0.3.37" and in previous versions it does not displaying the bold fonts.

    Is there a non-confidential example of this PDF that we could view?

  • Acrobat X Converts Non-Bold Font to Bold From Word Doc

    I had used Acrobat 8 at work for over three years with no problems converting any MS Office documents to PDF files.  I've purchased Acrobat X Pro for my use at home and now every time I try to convert a Word file (either a doc or a docx), it changes the font on the first page to bold and leaves the second page normal, as the original font in the Word file.  I'm not using an especially unusual font (tried it with both Californian and Antiqua, with the same results) and the font shows as embedded in the Acrobat properties, so I don't think that's the problem.
    Has anyone else experienced this problem and, if so, is this just one of those "improvements" that renders the software useless, or is it possible this is something they hope to fix soon?

    I'm not sure what you mean by "checking the font for changes".  In the Word file, only items that are supposed to be bold show as bold; in Adobe, the first page shows entirely as bold and the properties show that I have both regular, italic, and bold fonts - which is correct, because the original Word file has both regular, italic, and bold fonts in it - just not where they are supposed to be (at least on the first page). Second page is fine.  And, as I mentioned, "converting it from Word 2007 using Save As PDF" - that *is* using the plug in.  My point is that whether using the Word PDF plug in or converting directly using Acrobat X created the problem.  I say "created" because this morning, it seems to be working fine.  No rhyme. No reason. Not doing anything differently.  I do know that I've seen a similar problem in a PDF letter I received from a colleague who was using Acrobat X (while I was still using 8).  She reviewed the original Word file and, like mine, it was fine, it was just in converting that the problem arose.  So I've decided that the solution involves rebooting one's 'droid.  It seems that 21st century solutions are the same as they were a quarter of a century ago.  Oh joy.
    Thanks to all for the input, though.

  • Bold font in excel sheet

    Hi All,
    There is a program which generates the excel sheet from an ALV report. I want certain fields in the excel sheet to be in large bold font.
    Can anyone please suggest me the possible way to do it.
    Thanks and regards
    Rohit

    answered

  • Mail created in Sapscript not appear bold, font, image, ...only simple text

    Hi to all,
    I have created a form in Sapscript. This forms contains a image, box, text with bold, font Verdana, ...
    If I print this form this appears correctly (with image, box, ....) but if i sent to mail only appear the text without format.
    I need that the mail shows the image (not attached), box, etc.
    Can anybody helps me?
    Thanks a lot for your help.

    I've posted about markups in emails recently....problem is that your output form Scrip doesn't contain the HTML tags.  So, when email is opened, the user defaults (Outlook??) are used. 
    We work around this problem by creating email content that contains the markups that we need... But, we do it from ABAP, not SAPScript, so that's no help to you...

  • PHP Sendmail BOLD Font

    Hi there,
    I'm using a PHP sendmail script, although I want some of the
    writing to be emailed in BOLD font, it isn't the field results,
    it's the bit after the 'sprint' in the script I'd ideally like to
    be bold.
    Would be fanastic if anyone could share their knowledge.
    Regards,
    Kristopher (UK).

    On 20 Jan 2009 in macromedia.dreamweaver, Alan wrote:
    > as far as i know, you would have to send html email
    headers, then
    > use html or css to style the text to bold.
    That's correct.
    >
    http://www.google.com/search?hl=en&ie=ISO-8859-1&q=tutorial+send+html
    > +email+ php
    In general for all things PHP, your first stop should be
    http://www.php.net/ In this case,
    see Example 4 at:
    http://www.php.net/manual/en/function.mail.php
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • In Mountain Lion, bold fonts are being rendered misaligned.

    In Mountain Lion, bold fonts are being rendered misaligned, like shadowed text, when printed or saved as PDF. See example image. Same text is fine in Lion. Any solutions?

    I had this issue as well, googled a bit and found a solution that works just peachy...
    1. Open terminal
    2. defaults -currentHost write -globalDomain AppleFontSmoothing -int 0
    3. Restart applications

  • How to use BOLD Fonts/text in Oracle?

    Hi guys,
    Im doing a package and part of this package has an email to a client. I just want some details of that email should be BOLD fonts/text like the Name or Title. Can anyone help me solve this problem?
    Im using Oracle Forms6i and Oracle9i for our database.
    Thank you.
    Lala

    Hi,
    How about using a [Rich Text Editor bean|http://forms.pjc.bean.over-blog.com/article-28390950.html] (in place of a text item / text area)?
    -Arun

  • Disabling bold fonts in various terminals

    Alright, I've been using Xfce4-terminal ever since I started using Linux. At various points in time I've tried to switch to more lightweight terminals, but there's one feature Xfce4-terminal has that I can't find anywhere else.
    It has an option to disable bold fonts. This is very important to me, because bold and monospace really clash, you know? It looks like crap, and no offense to anyone, but I don't think it should have ever been made a "feature" in the first place.
    So, how do I do it? How do I disable bold fonts in my terminals? I'm hoping there's something I can put in my .bashrc or something. I'd appreciate any help I could get.

    i'm _guessing_ you could specify the *font and *bold.font as the same _normal_ font in your .Xdefaults.  in theory it would work? i'd be interested, i dislike the bold as well.  can't remember the exact .Xdefaults syntax right now though... maybe i'll post back in a bit
    edit, i think it's
    *font: -*- some non bold font -*-
    *boldFont: -*- the same non bold font -*-
    would that work? i can't test right now...
    Last edited by brisbin33 (2009-03-24 21:49:35)

  • Bold font in report output display

    Dear All,
    Will any one let me know how to set BOLD font in the report output display?
    Thanks,
    Ranjan

    <b>u cannot use this in 4.7</b>
    REPORT ZFONT NO STANDARD PAGE HEADING LINE-SIZE 80 LINE-COUNT 65.
    Start of print-control
    NEW-PAGE PRINT ON.
    PRINT-CONTROL FUNCTION 'SF000'.
    WRITE: / 'This is CPI 20'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF020'.
    WRITE: / 'This is CPI 6'.
    SKIP.
    PRINT-CONTROL FUNCTION 'SF008'.
    WRITE: / 'This is CPI 12'.
    Depending on your SAP printer device, this may also work
    PRINT-CONTROL FONT 1 LPI 6.
    you can try to change font and LPI numbers
    WRITE: / 'font 1 lpi 6'.
    PRINT-CONTROL FONT 2 LPI 6.
    WRITE: / 'font 2 lpi 6'.
    PRINT-CONTROL FONT 3 LPI 6.
    WRITE: / 'font 3 lpi 6'.
    End of print-control
    NEW-PAGE PRINT OFF.
    *--- End of Program

  • My unread messages are not in a bold font.

    How do you get unread messages in bold font? I have the new Mountain Lion 10.8.2. I am not using the classic view and it is checked off in preferences to have this feature.
    Can anyone help?
    Thank you.

    I'm using Apple Mail and I want to do my vacation message in Apple Mail.
    In Apple Mail there's an option for "send copy always to me", but it doesn't work for auto-respond.

Maybe you are looking for

  • Replacement for obsolete 'FM NAMETAB_GET'

    Hi,    We have been upgrading SAP from 4.6B to ECC6.0...During this process we have encountered an obsolete 'FM NAMETAB_GET', but as no documentation is available for the same, we are looking for an alternative / replacement for the 'FM NAMETAB_GET'.

  • Ipod with Windows ME..new program??

    Hey would really love some help please! Bought my ipod about a month ago, didnt realise that ITunes needed Windows 2000 or XP. I have Windows ME and downloaded another program to put my songs on. This has now expired and am now looking for another on

  • Error message 'Required disk not found'  help!

    Everytime I try to adjust my sync settings and then click apply and then sync I get a error message that states the 'required disk' can't be found.

  • Report service doesn't start after installing 9iAS

    Forms are fine after installing 9iAS, but report server doesn't start, and is not listed in Control Panel, Services. If I try start it as RWMTS60.exe -install oracledev2 tcpip I got the error "Please consult the installation guides for how to set up

  • Installtation of JDK 1.6.0_11 installs in System32 folder

    Hi, I have installed java 1.6.0_11 on my window vista enterprise 32-bit system. I was happy until I found out that ( despite the fact that is tells you that it installs java under C:\ProgramFiles) that it added: java.exe javaws.exe javaw.exe in my C: