JFileChooser - Changing Display Font

Hi all
Is there a very simple way to change the JFileChooser's display font from the default to say ("Verdana", Font.PLAIN, 11) without using a whole new look and feel?. I was contemplating the putClientProperty method but I've searched and can't seem to find any examples of how to use it.
Any help is greatly appreciated.
ICE

You should define "display font" since that is not a Java term. If you want to change all the fonts, try the
following (one version also changes the title bar's font).
You could easily tweak this code to differential between different components -- say give JButtons a different font).
import java.awt.*;
import javax.swing.*;
public class OptionPaneExample {
    public static void main(String[] args) {
        exampleWithFontChange();
        exampleWithFontChangeInTitleBar();
        System.exit(0);
    static void exampleWithFontChange() {
        Font font = new Font("Verdana", Font.PLAIN, 11);
        JFileChooser x = new JFileChooser();
        recursivelySetFonts(x, font);
        x.showOpenDialog(null);
    static void exampleWithFontChangeInTitleBar() {
        final Font font = new Font("Verdana", Font.PLAIN, 11);
        JDialog.setDefaultLookAndFeelDecorated(true); //optional
        JFileChooser x = new JFileChooser() {
            protected JDialog createDialog(Component parent) throws HeadlessException {
                JDialog dialog = super.createDialog(parent);
                recursivelySetFonts(dialog, font);
                return dialog;
        x.showOpenDialog(null);
    public static void recursivelySetFonts(Component comp, Font font) {
        comp.setFont(font);
        if (comp instanceof Container) {
            Container cont = (Container) comp;
            for(int j=0, ub=cont.getComponentCount(); j<ub; ++j)
                recursivelySetFonts(cont.getComponent(j), font);
}

Similar Messages

  • 10.6.7 Update Changed Display Font

    Weird: Did the latest security update on my MacBook Pro and next thing I know, my Safari bookmark bar; various system and Growl alerts; and my Photoshop alerts, dialog boxes and layer names are appearing in Helvetica Neue. They used to be either Lucida or Geneva. Don't recall which, but it was preferable, and I want it back!
    What's really bothersome is that my other user account, which I maintain for testing purposes, and therefore hasn't been altered from any of its original install settings, isn't displaying this annoying change.
    Weirder is the fact that my Safari and Photoshop apps have been affected, but not Mail, Dashboard widgets, or the subtext (a.k.a., the smaller definition text beneath the headline) in system alerts.
    I remember when you could control your display fonts!
    What am I missing?

    Since 10.6.7 and possibly since installing an update to Google Earth the default fonts in Mail, Safari and iCal displays have changed to something that I don't recognize. The numbers and day names in iCal look much plainer as do the numbers signifying unread mail in Mail folders. And the numbers on my Safari yahoo stock tables. If this occurred during the system update, can I reinstall the update without fear of losing anything?

  • How to change displayed font size in calc?

    I've got a user that has the following problem... The fonts inside of certain spreadsheets are too small for her to read easily. I'm looking for a way to set a default magnification value for her in StarOffice.
    As it stands now, the screen resolution and the StarOffice UI magnification are appropriate for her. However, she has to access spreadsheets that other people create, and the fonts inside are too small for her. It's quite a hassle (as she deals with large quantities of them) to change the "view" magnification for the spreadsheet each time she opens its. Even if she does that, it's lost the next time she opens the file (she doesn't edit, but just views). If she did save it, then the font would just be too big for the next user (and that doesn't solve the problem of all the new ones that won't be changed).
    So, unless someone has a different way of approaching it, I'm looking to find out how to change her StarOffice setup to override the view magnification stored in the spreadsheet and replace it with a default of her own!
    Thanks,
    Brian

    That's exactly what we're trying to avoid. This user pops open spreadsheets hundreds of times a day, just to grab a couple numbers off of them. Having to do the view/zoom thing becomes a significant slowdown.
    I ended up solving this with the help of the oooforums people who gave me a script that automagically changes the view/zoom whenever my user opens a spreadsheet.

  • Change displayed font of incoming messages.

    In Thunderbird, the body of incoming messages are displayed in a very small sans serif font. When I go to Tools/Options the default is Times New Roman, 16pt, which is not what I'm seeing.
    How can I make the incoming default larger and a different style.
    Thanks, TC

    Here is my universal guide to font sizes in Thunderbird. It won't all be relevant to your query.
    http://www.ramsden.org.uk/9_Type_sizes.html
    Many users are confused by there being two separate settings, one under '''Tools|Options|Display''' and another under '''Tools|Composition.'''
    One gotcha of Thunderbird is that while it offers to set font size and style, it forgets to give the typeface as an explicit feature of the outgoing document, and so it will be displayed by the recipient's email viewer or client in whatever their system default font provides. This often means Windows users see serif when you thought you were sending in sans serif. I think the [https://addons.mozilla.org/en-US/thunderbird/addon/stationery/ Stationery] add-on will fix this.

  • How to change the default window size display font size on Lync 2013 main window?

    Hi champs,
    Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
    Thanks,

    Hi,
    Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
    If not, as I know, there is no natural way to change it.
    If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • HOW DO I CHANGE THE FONT OF "Message to Display" IN THE Prompt User for Input

    Hi,
    HOW DO I CHANGE THE FONT OF "Message to Display" IN THE  Prompt User for Input?
    Thanks for your help 
    XN 

    Right click and select Open front panel >> Convert.
    Change the vi as you need. then you can save it as a normal sub-vi.
    If you have Labview 8.6, maybe (i am not sure) you can edit the express vi. Express vis are supported in 8.6

  • Can I change iTunes & iPod display font (not font size) for selected files only?

    I loaded a Russian classical music CD into iTunes and iPod. On the original CD, titles, names etc. are written in cyrillic alphabet.  Once I loaded the CD into iTunes and on iPod this info was displayed unreadably in western alphabet.  Example:  "Èæå õåðóâèìû..." (Í. Ãîëîâàíîâ)Õîð È.
    I have cyrillic font on my Windows 7 computer.  Can I change the display font--for only these selected iTunes music files--to the cyrillic font?  Thanks!

    Does any one know how you can adjust the font size (point size) for the file
    names.
    Sadly enough you can't chance that, feel free to add a feature request for
    that, the more there ask for the bigger chance it will be realized.
    It would be great if the colors for the image name (background and font color)
    could be changed so the contrast could also be increased so it is also easier
    to read.
    And this the cheerful part, go to Bridge preferences General tap and play
    with the sliders for user interface and Image Backdrop until your satisfied.
    BTW using the slider for thumbnail size bottom right of the Bridge window to
    increase the thumbs does not increase the font but makes it nevertheless a
    little clearer.

  • Has Mozilla changed the way Firefox displays @font-face enbeded fonts? The site I'm codeing works in Safari, Chrome, and IE, but Firefox 8.0.1 doesn't display the embeded font.

    Has Mozilla changed the way Firefox displays @font-face enbeded fonts? The site I'm codeing works in Safari, Chrome, and IE, but Firefox 8.0.1 doesn't display the embeded font.

    No problems here with the H1 headers.
    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)

  • I have Photoshop cs6 Ext on an ASUS laptop. How can I increase the font size of the contents of the FILTER Panel situated on bottom left of screen. The font size is extreamly small and almost unreadable. I have changed display parameters, not the resoluti

    I have Photoshop cs6 Ext on an ASUS laptop. How can I increase the font size of the contents of the FILTER Panel situated on bottom left of screen. The font size is extreamly small and almost unreadable. I have changed display parameters, not the resolution, to no avail.
    David.

    Paragraph breaks are good for readability. ;-)
    Have you noticed any difference between your MacBook and others at the Apple store? Wondering whether this is a configurable setting at the system level, i.e., DPI.
    You can default Firefox to a larger zoom level to avoid having to zoom every page. You'll still be able to adjust the size for individual sites as needed. It sounds as though you are aware of these add-ons:
    * Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    * NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
    There are some discussions about changing coming in Firefox 22 (I think) to address higher density displays like the Retina display. So perhaps there will be a built-in setting to address this in the future.

  • Display font changes

    It may be coincidence, may be not.But since about the time of the update to ff22I have been having a small problem with a page display.
    I automatically "save page as" with the web page html only save setting each night. When I load the saved page, the font initially displays correctly but after loading, it changes to a different and much smaller font from the original display. It seems to do this on several different machines so I was wondering if it may have to do with the update.
    The page is http://online.wsj.com/mdc/public/page/2_3022-dividends.html?mod=topnav_2_3000#dividendsB

    Saving it as "webpage complete" seems to load correctly, however it does generate a few errors about some *.js files not being found.
    "C:\temp\Display font changes _ Firefox Support Forum _ Mozilla Support_files\ga.js could not be saved, because the source file could not be read.
    Try again later, or contact the server administrator."

  • Can v change the font of the str displayed on the console?

    hi,
    Is it possible to change the font, size of the str displayed on the DOS prompt?
    regards,
    Deepa Raghuraman

    no, the Windows DOS shell utility sets the font. The System console is not for GUI displaying (and font is also a GUI component).

  • Change menu display font in Indesign cs6?

    I recently got Adobe Creative Suite 6 and am having problems with InDesign. When I open the program and am prompted for file size etc... the display font is Harrington (or something curly like that). The same goes for the stroke menu and font menu. Is there a way to change this display/default font?

    My question isn't about how to change the default font when using the text tool but how to change the display fonts for all menus. In the picture posted before I was showing you the drop down menus to point out the Harrington font used. In previous versions of Indesign that font was something basic and easy to read like Arial or Helvetica.
    Picture 1 is of Illustrator CS6. The font for space where I enter information (ex. Name : Untitled-1 ... Number of Artboards: 1 etc.) is a Arial but in Picture 2 the same fields are in Harrington - is there a way to change this to be like picture one?

  • Change label display font size?

    Wondering if there's a way to change the font size on the labels below folder and image icons. May well be right in front of me and I've just missed it. Thank you.

    There are many that would like that option, but presently there is none.  Perhaps submit a feature request.

  • Changing the fonts displayed in Configurator

    Is there a way to change the fonts used by the runtime configurator. For example, I have a new font file (futura-bt-b.ttf) that I want to use with configurator. I want all the labels, header text, etc. to use this font. How do I install it into the server (location, etc.) and how do I map it to configurator application? Thanks in advance.

    The Caption Style or Style setting indicates the style sheet definition you want to use to render the UI caption. For example, the style sheet BLAF.xss determines the font, size, and color of the text. This style sheet is located in the oa_html/cabo/styles directory. For information about personalizing style sheets, see the Oracle Applications Framework Release 11i Documentation Road Map (Metalink Note # 275880.1)
    Thanks,
    Vignesh R

  • Change the font color of a text field in a table by key-combination

    I want to change the font color of a text field in a table (single cell only) on pressing a key combination. Does anybody know how to do this.
    I have a lot of data in a table. During an evaluation of the data in a meeting I want to change the color of the text depending on the result of the meeting. (for example: High risk = CTRL+R makes the text red).
    I know how to change the color using a button, but I do not want to add a button after each cell. For this reason I would like to do it on a key combination that alway refers to the active cell.
    Many thanks for your help in advance.
    Marcel

    Hi,
    I don't think you can use the ctrl key like that as those shortcuts will be intercepted by Reader (ctrl-R toggles the ruler display on / off).  You also might have trouble updating the color while you still have focus on it.  You can use the shift key in a similar way, so if you only have lower case characters in the text fields then you can do something like;
    if (xfa.event.shift)
        switch (xfa.event.change)
            case "R":
                this.fontColor = "255,0,0";
                break;
            case "O":
                this.fontColor = "255,102,0";
                break;
            case "G":
                this.fontColor = "0,255,0";
                break;
        xfa.event.change = ""; // ignore character
    If you need uppercase characters maybe you can have one button to set "review mode" and test that on the if (xfa.event.shift) line.  But again it wont take effect until you have tabbed out of the field.
    Regards
    Bruce

Maybe you are looking for

  • Error Viewing Fillable PDF Forms in Adobe Reader on iPhone/iPad

    I created a fillable form on a Windows computer in Adobe Acrobat XI Pro, but when I open the document from an email attachment in the Adobe Reader app on my iPhone or iPad the top have of the form is blacked out (literally the top half of the documen

  • How come my pictures from iphone not showing up in iphoto stream

    I am not seeing my photos in my photostream on my iphoto despite the fact that I have my iphone set up to send to my imac.

  • When adding WRE54G to wireless network incompatible with Airport Express

    I added a Linksys WRE54G to expand my network to a Powerbook G4 laptop with a weak signal. When I connect the wireless expander, I no longer see the Airport express in the airport utility. I cannot access the printer or itunes speakers attached to th

  • Paper selection on Pixma MX860

    When printing from Acrobat Pro X (and similarly from Pro 8), I can only select paper from the rear bin of the printer.  There are two bins (cassette and rear).  There is no place to select the bin in the Acrobat print dialog, but if I click on the "P

  • InDesign CS6 Map export tags

    I have viewed the video on mapping which is most helpful. I have one difficulty. The export tags dialogue box shows only 6 heading options. Because my document was prepared for print, I have eight-nine heading styles. How do I deal with this problem?