Why I cannot change font  and Color in JFrame title??

Dear sir:
I try to change font and Color in JFrame title in code below,
It display all html code, not expected formatted ones.
but fail. Looks like no way to do it??
Can somebody help??
Thanks
import java.awt.BorderLayout;
import java.awt.Toolkit;
import javax.swing.*;
public class JFrameTester {
  public static void main(String[] args) {
     String iconPath ="file:C:/eclipse/workspace/Test/images/long.PNG";
     String title = "<html><body bgcolor=\"yellow\">" + "<img src=\""+iconPath+"\">" +
          " <font size=\"6\" face=\"Verdana\" color=\"red\"><b>"+ "New Tester" + "</b></font></html>";
    JFrame f = new JFrame(title);
    f.setIconImage(Toolkit.getDefaultToolkit().getImage("images/123.gif"));
    f.setSize(250, 250);
    f.setLocation(300,200);
    f.getContentPane().add(new BorderLayout().CENTER, new JTextArea(10, 40));
    f.setVisible(true);
}

Looks like no way to do it??depends on the L&F you want.
here's one way
import java.awt.*;
import javax.swing.*;
class JFrameTester {
  public static void main(String[] args) {
    JFrame.setDefaultLookAndFeelDecorated(true);
    UIManager.put("activeCaption", new javax.swing.plaf.ColorUIResource(Color.RED));
    UIManager.put("activeCaptionText", new javax.swing.plaf.ColorUIResource(Color.YELLOW));
    String title = "Hello World";
    JFrame f = new JFrame(title);
    f.getLayeredPane().getComponent(1).setFont(new Font("Tall Paul",Font.ITALIC,24));
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setSize(250, 250);
    f.setLocation(300,200);
    f.getContentPane().add(new BorderLayout().CENTER, new JTextArea(10, 40));
    f.setVisible(true);
}

Similar Messages

  • How do I change font and colors back to default?

    I have changed the font and color of the text through the tools button and the options button and the content tab. I find nothing telling me how to change the font and colors back to default font and colors. Can you advise me? I'm using Windows 7 Home Premium OS. Thanks.

    Hi Brenda19605,
    You can use this article to set the fonts and colors: https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use?esab=a&s=font&r=0&as=s
    The default settings for the font are in this article:
    https://support.mozilla.org/en-US/kb/Some%20text%20shows%20up%20bold%20after%20upgrade
    Unfortunately for the default colors has no good reference. But for text it is black (most lower left) color, background is white (most upper left color). Unvisited links is blue (column 8, row 5) and visited link is purple (column 9, row 5).
    Let me know if you need anymore help!
    Lordfreak

  • Hyperion web analysis can not change font and color

    In Hyperion web analysis, when I want to set or change font, a null dialogbox appear ; when I click and want to set or change color, nothing happen,even no dialogbox appears. Why?
    thanks advance!
    Edited by: user1016218 on 2010-1-8 上午7:16

    Hello,
    See my answer in this link:
    Urgently!  In Hyperion web analysis  font and color can not be changed
    May be it helps.

  • SQL Server Management Studio has stopped working when changing fonts and colors

    I installed sql server management studio 2012 about 3 months ago to test drive and from time to time I'll attempt to change my background color of the TSql editor "In the fonts and colors option under tools"; however, the entire studio crashes
    and restarts.
    This has been ongoing since I first installed it 3 or 4 months ago, and have waited on posting to a fourm for help, assuming I am not the only one this is happening to I've waited for an update that might fix the issue.
    I've got to start on some heavy scripting and that god awful white background kills my eyes. I've got to have a black background or my work day is cut off by about 3 hours becuase of strain.
    What can I provide to someone that would help me with this?
    Thank you,
    Erik
    Specialize in software for the construction industry.

    Hello,
    Could you please apply the following updates and let us know the results?
    http://www.microsoft.com/en-us/download/details.aspx?id=35575
    http://support.microsoft.com/kb/2790947
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How can I change the font and color of an email signature?

    How can i change the font and color of an email signature?

    Mail > Preferences > Signature
    Highlight the Signature.
    Click Format in the menu bar and select " Show Fonts".
    Select the Font.
    Highlight the Text.
    Click Format in the menu bar and select " Show Colors".
    Select the color.
    Mail > Preferences > Composing > Message Format:  Rich Text
    Best.

  • How can i change the font and color in mail 5?

    how can i change the font and color in mail 5?

    Mail -> Preferences -> Fonts & Colors
    If you want to change the font and color in a message you're composing, you can right-click on the message and use the Font/Show Fonts command to bring up the Font panel (among other ways).
    Regards.

  • Changing link navigation bar font and color

    Is it possible to change the font and color on the links for each page on iWeb?

    Welcome to the Apple Discussions. Yes, with the code and a HTML snippet that's described in this tutorial: #24 - How to Change the Basic, Rollover and Visited Color of an iWeb Navbar.
    However, if you want to create a site that is more search engine friendly I suggest you create a text based navbar as described in this demo page: Text Based Navbar. If you don't have a lot of pages in your site it's not too difficult.
    OT

  • Converting fonts and colors in master templates

    Hello,
    I'm learning Keynote 09. In order to create a new project, I clicked on the "White" theme chooser.
    I'd like to personalize the slides in that theme by changing the fonts and colors. What's the best/fastest way to do this?
    Thank you!
    Joe

    I agree Joe that that would be a simple and obvious productive feature equivalent to Stylesheets in DTP.
    Unfortunately if there is a theme running through all of Apple's software today it is the absence of retrospective editing ability.
    The closest you will get is to start off with your own Master and build on that using default attributes, refer to p224 in the UserGuide. This will carry through styles to +newly created+ material. If you want to change the set of master slides uniformly, it does mean going back to scratch.
    You could try providing feedback to Apple why this is obviously such a bad idea. However I think they have made their mind up already, at odds with 25 years of computer experience to the contrary.
    Peter

  • I would like to print links as regular text i.e. not underlined or in a different font and color.

    I have created a page with my resumé, using Dreamweaver CS4 on my iMac (running OS X 10.6.6).  You can see the page here: http://www.peterforkes.com/Resume.html
    It looks great when it is on the screen, but when I print it I would like the links to not be underlined and also to be displayed in the same font (and color) of the text surrounding it (a link is largely useless on a piece of paper, if it it not showing the URL).
    So, I created a stylesheet called "print.css" and have this in it:
    a:link {
    text-decoration: none;
    In my html document (Resume.html)  I have this code, at the top:
    <link href="_css/Resume.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="_css/Print.css" rel="stylesheet" type="text/css" media="print" />
    Now, things such as the graphics in my document do not print out (this is how I want it) but links seesm to be doing unexpected things for me.  As I mentioned, when I print the page I would like them to:
    a) not print with an underline (which I would expect the code snippet shown above to do).
    b) I would like the link color to be the same as the surrounding text (I have links in several places, such as in <h2>, <h3> and <p>).
    c) I would like the link to have the same font and text size as the surrounding text.
    Any help is always appreciated.
    Peter A. Forkes

    You've solved it for a:link but you may print the page with the <a> tag in link or visited state so you need to cover both.
    In http://www.peterforkes.com/_css/Print.css
    change
    a:link {
    text-decoration: none;
    to
    a:link, a:visited {
    color: #333;
    text-decoration: none;

  • Changing fonts and layout of Interactive Report

    Can we change the layout and fonts and colors in an INteractive report?
    Can we apply a report template to an interactive report?
    Edited by: SaintMahatma on Feb 23, 2009 1:48 PM

    I did it like this and it worked.
    <html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">
    <head>
    <title>#TITLE#</title>
    <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_3/theme_3_1.css" type="text/css" />
    #HEAD#
    <STYLE type="text/css">
    .apexir_WORKSHEET_DATA td *{
    background:#ffffff;
    border-top:1px #fff solid;
    border-bottom:1px #ccc solid;
    font-size:11pt;
    padding:3px 9px;
    empty-cells:show!important;
    </STYLE>
    </head>
    <body #ONLOAD#>#FORM_OPEN#
    It's a hard to read the apex_3_1.css because it's all written in one line. So it's a good way to copy the file into an Editor and add additional breaks after each ";"

  • Illustrator not recognizing some fonts and colors.

    My recently installed Illustrator is not recognizing certain fonts and colors which is producing problems in my designs.
    1. When I drag in a PDF to edit, the letters will appear as gibberish (random numbers, letters and signs) (the font was "arquitectura" which is installed on my OS X I Mac)
    2. When I try to change the color of a font using the eyedropper tool, it shows the proper color in the color box, but the font remains black.
    After googling it, these problems seem frequent back in 2009 but not so much today.  Im thinking it has something to do with this, which prompts when I open the application:
    "Your application install seems to be damaged, Please reinstall the application."

    sugarfactory,
    "Your application install seems to be damaged, Please reinstall the application."
    Obviously, you should. It is best to run the Cleaner Tool between uninstalling and reinstalling.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Font and Colors don't appear?

    Hi, recently found out that my font and color choices for AOL do not show up on other people's computers. I can view their font and colors...why can't they see mine?

    Oh...I didn't specify this, but it is people using the actual AOL client (both windows and mac) that can't see it.

  • I want to override webpage fonts but tools/options/fonts and colors/advanced/[]Allow pages to choose their own fonts doesn't work (unchecking it)

    tools/options/fonts and colors/colors does work to some extent - it does not overide link colors, but I don't really care about that. ^+ and ^- (ie control plus/minus) do work to change size to some extent - everything bigger/smaller, but of course not everything size=20, eg. I know there must be a way to do this sort of thing because years ago I could do it in Netscape.

    Some extensions that you can look at:
    * Default FullZoom Level - https://addons.mozilla.org/firefox/addon/6965
    * NoSquint - https://addons.mozilla.org/firefox/addon/2592

  • Font and Color Customization for the 8900 IP Phones

    Hi all,
    Is there any way to change the fonts and colors of the characters displayed on the phones?
    For example, the appearance of the line numbers, date and time, and softkeys.
    Thank you.

    No not supported on the phones...

  • Customize font and color in mail....

    When I write an email, well actually when I write anything... I use a lot of parenthesis.  It's part of my writing style.  I have Lion (will eventually get Mt. Lion) and in the mail program when I've written my emails I go back and make all the text in the parenthesis a smaller font and a gray color.  Is there a way to set up a keystroke or something so I can do this more easily?
    Thanks for any help.
    Susan

    Mail -> Preferences -> Fonts & Colors
    If you want to change the font and color in a message you're composing, you can right-click on the message and use the Font/Show Fonts command to bring up the Font panel (among other ways).
    Regards.

Maybe you are looking for

  • Multiple email accounts on my phone

    Hi, Not to sure if anyone knows of a solution to this but any thoughts would be welcomed. I have about 5 different email accounts set up on my iPhone. I took the plunge and swapped my email from POP3 to IMAP, my thought was that especially as I now h

  • Issue with CALL SELECTION-SCREEN

    Hi experts, I am working on a report. Here on the selection screen , based on the selection of some radiobuttons ,i want to call a secondary selection screen. So i am using the following program code , AT SELECTION-SCREEN on BLOCk blk. IF p_abc  =  c

  • Sharepoint 2010 integration with yammer.

    Hello, I am trying to getting Yammer feeds into share point page by using Content Editor web part but i am getting below error. can anyone help on this "The page or app using unsupported version of yammer platform"

  • 1% battery new rMBR is it bad to drain it to that percentage?

    Hello, fairly new to Macbook pro used an iMac for over 6 years.. but I've had my macbook pro retina for just under a week and lovin' it! But I was experiecing problems with battery life to what I thought. So i called Apple care and disccusessd this i

  • I tunes constantly crashing if i try to delete or subscribe to anything in itunes store. any ideas

    Have been having the same problem for months now. Allows me to play but not to delete or subscribe. can anybody help?