A tiny font is used in many places across Java Swing applications (help!)

In many places in Java but mostly in text boxes I'm seeing a very small font that is quite hard to read.
I am seeing this all over the place in Java programs and it is getting on my nerves.
I'm not sure what is causing this.
I also encountered this issue when running Java on Windows XP.
I really need help on how to solve this,
Or maybe it is actually a bug with Java itself and Windows?
An image of the problem in SwingSet2:
[SwingSet 2 Tiny Font Example|http://img687.imageshack.us/img687/1373/swingset2tinyfont.png]
System spec:
Windows 7 Professional 32-bit (Aero is on)
Java 6 Update 20
English system locale and language
No special dpi settings (default)
Screen Resolution: 1280x1024
Avast Antivirus 5.0
An intel graphics card
Edited by: Temp111 on May 9, 2010 7:38 AM

camickr wrote:
That is not a problem. Somewhere in that code the programmer uses setFont(....) to make it a smaller font. The default font of a text component does not behave like that.
For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org/], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.No, it's defiantly a problem. Probably in the default fonts that Swing uses in some places.
I detected one place where I can easily trigger this issue, a JTextArea And the Windows Look and Feel, So here is a SSCCE for you:
[Picture Of Tiny Font SSCCE With Tiny Font issue|http://img88.imageshack.us/img88/7876/tinyfont.png]
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class TinyFont {
     public static void main(String[] args) {
          try {
               UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
          } catch (ClassNotFoundException e) {
               e.printStackTrace();
          } catch (InstantiationException e) {
               e.printStackTrace();
          } catch (IllegalAccessException e) {
               e.printStackTrace();
          } catch (UnsupportedLookAndFeelException e) {
               e.printStackTrace();
          JFrame frame = new JFrame("Tiny Font");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JTextArea textArea = new JTextArea("Tiny Font Test");
          frame.add(textArea);
          frame.setSize(150, 100);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
}But I also encountered this issue in other places that use Swing.
Try SwingSet2 Source Code Tab for example: [SwingSet2|http://java.sun.com/products/jfc/jws/SwingSet2.jnlp]

Similar Messages

  • What is the best font to use for Thai Language in Flex Mobile Applications ?

    Hi
    I am facing issues with Thai language in flex mobile applications. I am using Tahoma font and facing issues in TextInput
    Whith Tahoma font text Offset setting to far from the starting of the text input .
    Can any one suggest me the best font to use with Thai language ?
    Many thanks in advance for your help .
    Regards,
    Kamal

    Personally, I prefer uncompressed TIFF or PNG.  But many times it won't matter ... you'll be dropping the images into an SD Sequence, so they will lose resolution on output.
    -DH

  • Using the JMS API in Java EE Applications

    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.

    peterwkc wrote:
    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
    >
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so.

  • I have trouble reading the italicised font Firefox uses on many websites

    Firefox will load a webpage in a font that is very difficult to read, and i can't find how to change this. I then close the page in FF, and open it in Chrome and ie, no problem. But I like FF best! help, please.

    https://support.mozilla.com/en-US/kb/Options%20window%20-%20Content%20panel#w_fonts-dialog
    http://imageshack.us/photo/my-images/405/image000aa.png/

  • How can I use Tree in place of JTree( Swing)?

    I want to use Tree not Jtree but AWT TREE ( if possible)
    Jtree is so heavy to use in PDA programming.

    Well as you can see, AWT doesn't come with a Tree component built in. But I know a number of companies produced AWT-compatible Tree, Table, etc. components for sale. Can't name any names because I never used them. But you should be able to track them down on the Internet.

  • Using built in isight on other chat applications-HELP PLS!

    Hi all, i have tried using my built in isight cam with various different chat applications e.g. Yahoo Messenger but when i try to use it on various other sites i get given a small user settings box with 5 tabs at the base of the box one of which is for the video side of things. i tick the necessary box to allow video but the green light next to the isight doesnt come on? there is a drop down list of 3 different types of cam but the isight isnt on this list?! so my question is how do i turn on the isight on these chat sites if at all? maybe because its a built in cam it wont work ? i just dont know but when i had my old windows laptop last year with an external cam then i had NO problems at all! is it an Apple thing?! HELP please as i'm a relative Mac newbie and am still discovering how on earth you operate this machine!
    cheers all, Jason C.

    Thats a Flash player window, have you got the latest Flash player http://www.macupdate.com/info.php/id/4783/adobe-flash-player
    Also in the settings it should be for the cam.

  • Pojo used by many other objects

    Hello all,
    In my application I have got a complex entity containing lists and maps filled with data by the persistence tier and that entity is to be used by many other objects in my application, including many controllers. I am trying to find a way to access that pojo in the most practical way. For that I could use a kind of factory such as:
    public final class MyPojoFactory
        private static MyPojo instance;
        public static MyPojo getInstance(){
        if(instance == null){
           instance = new MyPojo();
           return instance;
    }and then access my pojo using the MyPojoSingleton.getInstance() method throughout the client part of my application. However, I am bit concerned about the thread safety of this implementation since instance is a static variable and that its state could be altered indeterministically.
    What I've thought of is having a parent abstract class extended by all the classes that would need this pojo. But sometimes these classes hierarchy gets really deep and I end up with things like myClass.getParentClass().getParentClass().getMyPojo() if you see what I mean, which I would like to avoid.
    Any solution or design pattern or simpler implementation I should have a look into?
    Thanks a bunch,
    Jimmy

    Well thanks for this tip! But I've got another similar case where the service needs an id as parameter as such:
    public final class MyPojoFactory
        private static MyPojo instance;
        public static MyPojo getInstance(long primaryKey){
        if(instance == null){
           instance = service.getData(primaryKey);
           return instance;
    }In that case I don't think I could use my PojoFactory because the instance object has a global scope, doesn't it? How could I handle such a case?
    Thanks again,
    Jimmy

  • Use Adobe Reader (or others) in Java Swing

    Hi,
    is there an adobe solution to show pdf files inside an java swing application?
    Regards
    Arno

    >(1.)Is there a limit to saving the form data?
    It is my understanding that you can harvest data from a form 500 times whether that be from one user of 500 users.
    >(2.)If there is a limit to saving the form like 500 times, can the same form be recreated and the limit of 500 starts all over again
    You'd probably be walking on thin ice by trying that. Could be a loophole but maybe not.
    >(3.)Do I need to purchase a license to save these form data?
    Not if you stay within the limit that is stated in the EULA.
    >(4.)How many forms can have enable usage rights in Adobe Reader per Adobe Acrobat professional?
    Different forms? As far as I know there is no limit to the amount of different forms you use.
    In my opinion, if you think you are going to go anywhere near the limitations of the EULA, consult with your attorney before proceeding. The form enabling function was never intended for large business use. Adobe has another, more costly, solution for that.

  • How can I use java swing class in JSP page design

    I am a new developer in Java server pages. I want to use layout managers available in java swing classes to design the page. Can any body suggest me a way to do this.Is it possible if I do it with servelets.

    So, you want to use layout managers within your JSPs?
    The immediate answer is that "it isn't a good idea". The more considered answer is "tell us what you're up to".
    Are you coding all presentation within a traditional JSP? That is, HTML, customer or library tags and/java scriptlets?
    Or are you building your HTML within your servlets and sending that back to the browser?
    If the first, then you are probably better off either using explicit HTML tables (or the equivalent custom tags) or finding a library that you can use.
    If the second, you can write classes similar to the Swing layout managers that end up being a fancy way of putting elements into an HTML table. We have exactly that in my current environment. I wouldn't recommend rolling your own and I'd tend to leave all that presentation stuff to the JSP.
    In any case, you can't really use the Swing layout managers as they are for an entirely different pradigm.

  • How to use MVC in Swing application

    Hi,
    I'm creating an application using Java Swing. I want to use Model View Controller (MVC) architecture to design by application. I want to use MVC to seperate by business logic functionality from the control and presentation logic that uses this logic.
    I need your help to get this done successfully. Please send me a SAMPLE JAVA SWING APPLICATION where they have applied MVC, it will be helpful to me.
    Thank you,
    Regards
    kumar

    Would this be a basic example of an application that uses MVC?
    //MODEL
    public class Model {
         public void showMessage() {
              System.out.println("You clicked me!");
    //VIEW
    import javax.swing.JButton;
    import javax.swing.JPanel;
    public class View extends JPanel {
         private JButton buttonSave;
         public View() {
              super();
              initUI();
         public void initUI() {
              buttonSave = new JButton("Save");
              buttonSave.addActionListener(new Controller());
              add(buttonSave);
    //CONTROLLER
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Controller implements ActionListener {
         private Model m;
         public Controller() {
              m = new Model();
         public void actionPerformed(ActionEvent e) {
              m.showMessage();
    }Is this a correct implementation of MVC? I am trying to learn it, and use it in an example.
    Thanks for your help/input.

  • Tiny font on Menu Bar & on window when using Apple Mail on new Macbook Air

    I have a new MacBook Air and all is good - except my Mail window has tiny fonts, including on the tool bar, and the Menu Bar is also has smaller fonts when Mail is active. I have made the actual messages readable but the rest of the screen is almost too small to read.

    I just got my new MacBook Air and I was also really, really disappointed that the menu bar fonts - and all default text sizes in general - are much too small. I wonder if it has to do with the fact that the optimal resolution for the monitor is now 1440x900 instead of 1280x800 as it was in the older MacBook Air models. I guess I just have to go to the optician and get myself a pair of glasses...
    But I think this is clearly a design -related problem that Apple should fix asap!

  • TCS3 Frame Conditionl text causing tiny fonts in RH Topics

    With a linked FrameMaker book, in the Conversion Settings dialog box > Other Settings, I've selected Apply FrameMaker Conditional Text Build Expression. In FrameMaker I've selected Show as per Expression.
    The results are disappointing. In apparently random paragraphs in topics that include conditional text, RH is inserting this in the html:
    <span style="font-size: 4.0pt;">
    Sometimes it inserts it alone, and sometimes it includes it with other extraneous information such as:
    <span style="font-style: normal; font-weight: normal;
    font-size: 4.0pt; letter-spacing: 0.00em;">
    There are no paragraph ovrrides in any of these instances, and it only happens when Apply FrameMaker Conditional Text Build Expression is selected. I could build my expressions in Robohelp, but I'd prefer to manage conditions in Frame for reasons such as excluding many sections (topics in RH) that are conditionalized as "print only." With this check box selected, they don't appear in RH; but without it selected, I'd need to conditionalize the topic again in RH.
    Any thoughts?

    I just wanted to update in case anyone else has a similar issue.
    The problem has gone away and I'm not entirely sure how I did it. I suspect it has to do with how I displayed the conditional text in FrameMaker. Typically I'll just use the Show/Hide dialog box to move conditions to the Show or Hide areas. When I instead built an expression that excluded the conditions (e.g, NOT"Cond1"ANDNOT"Cond2" etc), the problems with the tiny fonts ended. Interestingly, the problem persisted when I built expressions that included conditions.

  • Creative cloud  - Menu Bar and Palette's are tiny font.

    I just downloaded creative cloud on my lenovo Yoga Pro 2.  The size of my Menu Bar and Palette's are tiny font.  However, Lightroom menu bar and palette's are in a normal size easy to read font.  Can anyone tell me how to change just Photoshop?

    For now the solution seems to be using the Scale 200% setting in Edit>Preferences>Experimental Features.
    There is also a setting in Edit>Preferences>Interface>UI Font Size that enlarges some of the fonts, although not the menu bar.
    After changing either setting, you need to restart photoshop to see the changes.
    (File>Exit)

  • When you create a PostScript file you must rely on system fonts and use document fonts

    I got this error:
    "When you create a PostScript file you must rely on system fonts and use document fonts. Please go to the printer properties, "Adobe PDF Settings" page and turn OFF the option "Rely on system fonts only; do not use document fonts."
    This strikes me as bad practice. I only want to use system fonts and document fonts will muck me up.
    That being said, I could not easily find a way to fix this with Acrobat Pro XI. I opened Control Panel (Windows 8) and found the printer and mucked around in the various ways to get to change the PDF settings (there are several ways, and some of them present the choices as bold and not just regular). I found two separate switches for "Rely on system fonts only; do not use document fonts" and turned both off, BUT that did not work.
    Frustrated, I went back to FrameMaker and clicked File > Print Setup and then for the PDF printer, Printer Properties. There I found a THIRD instance of "Rely on system fonts only; do not use document fonts" that was set differently than the other two. This was the setting the error message meant. Change this one.
    Thanks for the convoluted UI, Adobe. What a pain, but there is the answer for all who follow after....

    > Windows 7 and Frame 7.2.
    This is not a supported configuration and probably does not work, due (I'm guessing) to driver API changes from XP to Win7, which would affect generating PDF and Ps output. This would affect Save-as-PDF and Print-to-Ps+Distill (unless you have a newer version of the full Acrobat product).
    As it happens, I'm going to attempt something similar: FM 7.0 on Win7 64 Pro. However, I'm going to install that old FM in "XP Mode".
    XP Mode is a 32-bit virtual machine running actual Windows XP inside Win7. It is (now maybe "was") available for Windows 7 Enterprise, Professional and Ultimate (but not Basic, Home or not-so-Premium). When XP went off support life earlier this month, Mr.Bill may have taken down the ability  to download XP Mode (or not, since some large enterprises are able to  purchase continued support for XP at some great cost). XP Mode never was supported for Win8. There are other VMs for Windows available.
    If XP Mode is still available, you also need a CPU that has hardware virtualization, which all recent 64-bit AMD processors do, but which is fused-off in many low end 64-bit Intel processors. AMD processors need a separate unobvious hot-fix patch installed before you do anything else about XP Mode.

  • Finding Fonts in Fireworks - Why Does it Always Start at the Top, Instead of the Last Font You Used?

    I've been using Fireworks for many years and I love it (currently using CS5).  But I live irritated with the way it starts at the beginning of your font list when you're selecting a font - instead of going right to the last font you used, which is how many other programs work.
    Is there a way to change settings in Fireworks so it'll do this?
    Thanks in advance for any help you can offer!

    I scanned that article and it explains how to set the number of recent fonts shown at the top. But here's what I was talking about...
    Let's say you're working on something and you have your text highlighted and you're working down the font list trying different fonts. You try a few A fonts, then B fonts, and so on, down the list.  Well, instead of Fireworks bringing you back to the current font IN THE LIST, everytime you go to try another font, it starts back at the top, and you have to scroll down and find where you were in the list ALL OVER AGAIN EVERY SINGLE TIME.
    In Illustrator, when you have the Character box open, it does exactly what I'm describing. If you have some text selected, every time you change the font and go back to the font drop-down, it takes to you to where you are. If Myriad is the font you are currently using, it doesn't start you back at the top when you go to the drop-down to find another font. It takes you to Myriad in the list. 

Maybe you are looking for

  • Hp D7360 photo prints are all too dark or red tinged

    every single photo we print we have to manually adjust settings to get it to look like the camera took it and the monitor shows it. they are always too dark or red toned. we do most of our printing in kodak easy share, i've changed color management f

  • Problems publishing handout in Word 2007

    I recently updated to Captivate 5 and when I publish the handout version with the table option selected and one screen per page. The background pictures are smaller than they were in Captivate 4, and the pictures are stretched horizontally??  Can any

  • Compilations in wrong order on iPod

    Has anyone had an issue with making their own compilations? This only seems to happen if I create my own compilation (not playlist) from a selection of songs - despite everything looking fine in iTunes the songs are in the wrong order on the iPod. I'

  • Iphone 4 warm and battery power lost in half a day

    my iphone 4 has been very warm, lost battery power from 100% to 20% in half a day. its done this twice since i got it in march. i only txted on person today and i didnt use my 3g at all or wifi. please help

  • Trouble Installing Desktop Manager

    Keep getting the following message when I try to insall v. 6.  I'm running XP.  Any suggestions would be greatly appreciated. Windows ® Installer. V 4.5.6001.22159 msiexec /Option <Required Parameter> [Optional Parameter] Install Options     </packag