Setting a Pre determined Font size for an Application.

I have a Swing application that is running on Windows and the FONT size
expands on the GUI if I change the Appearance of the Font in Windows XP
This normally should not happen as the appearances of the Windows Font size
should have no impact on the application that is running.
But to be on a safer side,can can I use any method that will have a predetermined
FONT size when the Swing application executes:
like : setFont(new Font("Courier", Font.PLAIN, 12));
The code below is the starting point of the application.
public class RFApp extends SingleFrameApplication {
     private RFMainFrame mainFrame;
     @Override
     protected void startup() {
          mainFrame = new RFMainFrame();
          setMainFrame(mainFrame);
          show(mainFrame);
public class MainFrame extends JFrame {
     private final ToolBar toolBar = new ToolBar(this);
     private final StatusBar statusBar = new StatusBar(this);
     private final MainPanel mainPanel = new MainPanel(this);
     public MainFrame() {
          super("Main Frame"); // This has a BIG FONT increase
          initComponents();
     private void initComponents() {
          setLayout(new BorderLayout());
          getContentPane().add(toolBar, BorderLayout.NORTH);
          getContentPane().add(mainPanel, BorderLayout.CENTER);
          getContentPane().add(statusBar, BorderLayout.SOUTH);
}

Since you really need to change foreground and etc. Use the following code to list all the resources that may set the font colors you want (the example only excludes background color resource, so it may set more than what you want, you need to pin point specific color resouces from the print out to suit your own need).
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
for(Iterator i = defaults.keySet().iterator(); i.hasNext();) {
String name = (String)i.next();
Object value = defaults.get(name);
if (value instanceof ColorUIResource && !name.endsWith("Background")
&& !name.endsWith("background")) {
System.out.println(name);
UIManager.put(name, new ColorUIResource(Color.red));
}

Similar Messages

  • Font sizes for kiosk applications?

    hi,
    I'm currently making an interactive for a kiosk. I'm
    wondering if anyone knows of any good resources, rules of thumb or
    research on choosing a good font size for that type of situation
    where the hardware spec is fixed.
    TIA,
    John

    John,
    The Kiosk Podcast episode is up....you can go directly to our
    webpage to
    listen to it or listen to it in Itunes. Here is a link to the
    show:
    http://www.magicgate.com/podcast/kiosk/
    The section you are looking for is the "Kiosk Resource Of The
    Week"
    Hope this helps!
    SKIP
    "j_f" <[email protected]> wrote in message
    news:e2o0vm$la2$[email protected]:
    > Thanks Skip,
    >
    > I look forward to hearing that when it becomes
    available. In the meantime I've
    > found this paper from Loughborough University in the UK
    saying that 16pt is the
    > minimum which should be considered. Seems a bit vague as
    it doesn't mention
    > screen resolution.
    >
    > Thanks again,
    > John
    >
    >
    http://ui4all.ics.forth.gr/UI4ALL-97/maguire.pdf

  • How to set different pointsize  (Font Size) for different text range in the single textframe.

    I have a one textframe in which i want to  set three different pointsize(font size) for three different text ranges. I have set different tag name for different text ranges . So How can I set different pointsize in the single texmframe.
    Please reply me if anyone is aware of it.
    Thanks,

    Jack,
    Extending Martti's post, you can create an XSLT that will add an element around the ASD2.1 part when you import the XML file into FrameMaker. Then FrameMaker's EDD can format this added element with a font different from the one used in the content element.
    Van

  • Set global font size for the whole application.

    Is there a way of setting a font globally
    What I mean I want to set a font size for the whole application.
    Is this posable ??
    Thanks Craig

    After posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
    The answer for Swing applications is yes this can be done.
    I don't know how to do it for AWT components.
    Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you.

  • Set custom font size for one column

    hey guys! I am trying to decrease the font-size for one column based on an lov and used
    style="font-size:8pt"It does not work though! Do you have a hint?
    brgds,
    seb

    Hello Seb,
    >> Might it be important whether the column is of type "...based on lov"?
    If by "...based on lov" you mean “Display as Text (based on LOV, does not save state)” the answer is yes. This type of column is not treated as an updatable column (the implementation is by using a regular <td> tag and not the <input> tag) so the Apex engine ignores the Element Attributes field.
    As far as I can tell, this column can only be styled in the query itself (and you need to implement the LOV yourself).
    Another option is to use a select list and disabled it, but the column will appear in gray, and with small font size it doesn’t look that good.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • How to change font size for tracks in Songs view, iTunes 11?

    I'm wondering which field in TextStyles.plist for the new iTunes 11 (I've gotten rid of Helvetica for Lucida Grande thanks to another forum on here!) - controls the font size for track title, time, artist, album, etc. as seen here - I would like to have it smaller, and have been playing around on several forums and not found the magical field to get that exact thing smaller. Many thanks in advance.

    You're going to love me forever:
    <key>9002</key>
    <dict>
    <key>- loc hint -</key>
    <string>List Contents (Small)</string>
    <key>font</key>
    <string>HelveticaNeue</string>
    <key>size</key>
    <integer>12</integer>
    </dict>
    It's that interger "12" that's determines the size. Adjust it until you're happy—provided that it's an interger.
    I actually go with "HelveticaNeue" with a size of 11. I like to see lots of tabular information at once, horizontally, without changing my resolution… within reason, e.g. Fiona Apple album titles still have ellipses.
    An unfortunate aspect to this is that the row height isn't altered unless the font size specified is greater than 12—the font takes the row height along for the ride when it's bigger, but the row doesn't come along for the ride when the font gets smaller. It's likely you could change the minimum row height to be lower, in some other plist—search for something like "list contents (small)" or "list (small)" or whatever—but I don't know where that would be found, or if it could be found at all.
    Nonetheless, this should address your query.

  • Maximum font size for auto-sized form text

    You need to let the user select a maximum font size for automatically sized text. If most of your fields are set at 10pt type, but you have one field for which you want the text to resize automatically, it looks stupid if that cell contains a small amount of text that’s set at 16pt or whatever. If you could set the maximum font size to 10pt for that field, then the text would be consistent with the text in the other fields unless there is so much text that it needs to scale down.

    Can anyone please advise?
    Cheers

  • Is there a way to increase the font size for the "songs" and "artists" lists in the new music app for iPad 2 (iOS 5)? It is too small for me.

    Is there a way to increase the font size for the "songs" and "artists" lists in the "music" app for iPad 2 (iOS 5)? It is smaller than the previous version.

    falkner09 wrote:
    is there really no fix for this?
    It would depend on your definition of "Fix"
    Your iPod touch running OS 4.2 has a ZOOM feature which will enable you to see the screen more clearly.
    To turn Zoom on or off got to:
    Settings > General > Accessibility > Zoom and tap the Zoom On/Off switch.
    _To Zoom in or out_:
    Double-tap the screen with three fingers. By default, the screen is magnified 200 percent. If you manually change the magnification (by using the tap-and-drag gesture, described below), iPod touch automatically returns to that magnification when you zoom in by double-tapping with three fingers.
    Increase magnification: With three fingers, tap and drag toward the top of the screen (to increase magnification) or toward the bottom of the screen (to decrease magnification). The tap-and-drag gesture is similar to a double-tap, except you don’t lift your fingers on the second tap—instead, drag your fingers on the screen. Once you start dragging, you can drag with a single finger.
    _Move around the screen_:
    When zoomed in, drag or flick the screen with three fingers. Once you start dragging, you can drag with a single finger so that you can see more of the screen. Hold a single finger near the edge of the display to pan to that side of the screen image. Move your finger closer to the edge to pan more quickly. When you open a new screen, Zoom always goes to the top-middle of the screen.
    _Large Text_:
    Large Text lets you make the text larger in alerts, and in Calendar, Contacts, Mail, Messages, and Notes. You can choose 20-point, 24-point, 32-point, 40-point, 48-point, or 56-point text.
    Set the text size: In Settings, choose General > Accessibility, tap Large Text, then tap the text size you want.
    I hope this has helped a little - other than this option I think it pretty much is what it is.
    BTW - This information can be found on page 208 of the iPod Touch iOS 4.2 Users Guide.
    Best wishes..
    Ricky

  • Change font Size for Lock Screen Message

    In system preferences Security & Privacy you are able to set a lock message for the lock screen. Is there a way to change the Font Size or even the color of the message in Mavericks?

    I was able to set the font size for all the text on the envelope by pressing the Set button for the font. The size is on the right side of the dialog box. If it is not working for you, try choosing another font, and then going back to the one you want.

  • Change Font Size for Table Column

    Hi,
    How can we set different font sizes for table columns?
    Thanks,
    Uma.A

    Hi
    Set Design property of table column
    Aslo check this link
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/66/18b44145143831e10000000a155106/frameset.htm
    Thanks

  • Can the font size for Nokia 3250 be increased for ...

    Sir,
    I am having Nokia 3250. The font size in the mobile looks very small. I would like to know if there is any way we can increase the font size for viewing either by changing its setting or by putting any software in it.
    Pls help.
    Regards
    [email protected]
    INDIA

    You need to download and install an additional program to make the fonts bigger, it does not cost much (€9.95):
    http://shop.psiloc.com/en/Application,262290,Psiloc+Font+Magnifier

  • Increasing Font Size for Reading pdfs

    Is there a way to boost the font size (beyond the double-tap) for reading pdfs on the iphone? Something like setting the font size for email perhaps?
    Thanks.

    This is only slightly true. You can zoom in a little when viewing a PDF, but soon you reach some iPhone limit and the page gets larger as you exapnd, but then when you release it drops back. Unlike with Safari on a web page where you can make it as big as you want (well at least really really big).
    This is VERY annoying (I think I'll submit a bug about it actually) as I can't get the text big enough to easily read it. Why is there a limit in the first place?

  • Default font size for a value in a table in Answers

    Hi,
    I am trying to set a default font size for a column of table view in Answers, so that when I create a new report, this default font size is used. Can someone please point me to the file where I can make this change?
    Thanks

    Well if you have a tag like this:
    element.style {
    background-color:#FFFFFF;
    font-size:9px;
    It means it's coming from the formatting in the request in Answers...not from a style sheet! You'll note in Firebug, that there's actually no *.css file mentionned. I.e. example from here:
    element.style {
    color:#00AF00;
    .OORD {views.css (line 1574)
    text-align:right;
    .PTE {views.css (line 1077)
    background-color:#FFFFFF;
    First part element.style comes from my conditional formatting and doesn't reference any css file
    The other two elements are from the views.css which control my pivot table.
    See the difference?
    Cheers,
    C.

  • Onscreen font size for "spell check" and "font"

    How do I increase the onscreen font size for "spell check" and "font"? I just tried to spell check a document and the font size was so small I can't see what it says. Also, when you click on 'font' to change it, I wish the list of fonts was larger so I could see it clearer. I have pretty good vision so it's not that, it's just the size of the font....it must be at least 6! Thanks for your help.

    Hi, Diane. I don't know what sort of display you're using, but it sounds like you have a flat LCD display. At any resolution lower than its maximum, a flat-screen LCD display is always blurry, and the lower the resolution, the blurrier it is. This is because unlike a CRT display, an LCD has a fixed number of physical pixels in it that can't be changed. If you instruct it to "pretend" it has a smaller number of larger pixels by setting it for a lower resolution, each of the "pretend" pixels has to be made up of several real pixels instead of just one, and no pixel can be (for example) half white and half blue: a pixel is an indivisible unit that is always all one color. So the only way the hardware can use several pixels to represent one larger one is to gradate the colors of those pixels as best it can to approximate the intended image, and that inevitably spreads the gradation out — which is exactly what blurring is. This is just an inbuilt property of LCD displays, not a defect that needs to be (or can be) fixed. The solution is to buy a display that works well for you at its highest resolution — which will probably mean a lower-resolution display than you have now.

  • Font size for Safari menu and tabs headings

    Hi,
    I setup Safari for the first time on my new Nexoc Laptop and have been very pleased that it works quite nice. My display resolution is 1900x1200 , so I love the possibility to set a minimum font for viewing pages.However as this works fine, I don´t find any possibility to get the menus of Safari readable without headache. I Set up the Window fonts to get Window´s windows readable, but how to archive bigger font-size for the Safari Menus ?

    You can increase the String pref layout.css.devPixelsPerPx from 1.0 to 2.0 in 0.1 steps to see what works best.
    In Firefox 3.6 and later this pref is a String value parsed to a float and allows to fine tune the dimensions of all elements more precisely.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

Maybe you are looking for

  • IMessage on the iPhone 6 doesn't allow me to sign in with my current email

    Hey guys, So here's the problem - I can send and receive texts/iMessages on my iPhone 6. I cannot, however, hook up my macbook pro to the same account to use the messaging service with, as Apple has said would be possible (answer texts on my macbook

  • How to display database name in page footer in webi report

    Hi Every one, I have migrated deski report from BO 6.5 to BI 4.1. and converted Deski to WEBI in 4.1. In Bo 6.5 page footer displaying database name but BI 4.1 it showing database type (like Oracle 10g,9i ..etc..). I want database name in page footer

  • Integrating an Exisitng multiple page PDF file into a report and outputting as one PDF

    Post Author: sditmer CA Forum: Crystal Reports We would like to be able to  PDF files into a report based on a file name contained in the detail of the report. For Example, I have some data in our database relating to a specifc PDF file  including th

  • How to restore ipad

    I do the upgrade 5.0 All photo and data in ipad is gone. Can it be Restore ? I open the mobilesync and I find bund of code file  ,but  i could not restore back ? The photo i need it back urgently. What can i do and can it restore back Thanks! Delon.

  • Can't get past configuration utility to find MAC address

    How do I locate my iPod Touch's MAC address prior to completing the configuration utility so that I can add the address to a router's MAC filtering list?  It doesn't appear that I can do anything with the iPod unless I first  go through the config pr