a netbeans rcp blog

Global font size

Posted by Nicklas Löf on October 15, 2010

This is a really nice trick. I usually think that the font size of a Netbeans RCP application is too big. Even if it’s possible to change the font size on swing components the over all user interface can’t be changed from there.

So this is a trick I have been using for some time but always forget where to put it and the syntax.. So here it is.. To change the global font size setting just add the following line to (I always put it in both the suite and my modules)

run.args.extra=--fontsize 11

And voila.. the global font size is much better now.

Now you are happy.. you finally have changed that fontsize problem! Let’s build the JNLP application and deploy it on the server! 5 minutes later you stand at your boss desk.. cleaning the jnlp java cache just to be sure that everything works! So the application launches.. Nice splash screen showing.. and eeehh.. what? the font size is still to big? Damn Nicklas!!! lying about this stuff in his blog!!!!!

So.. this doesn’t seem to work when running the application as a webstart application.. you actually need to add two more lines in that case.. In your suite open the JNLP Descriptor that can be found in the Important Files folder. Look for this part:


This is the part of the jnlp file that sends extra argument to java when the application is started. So we need to add two lines so it looks like this:


And voila.. now you can walk to your boss desk again and show the application.. (but remember to clear the java cache first.. you never know…)


One Response to “Global font size”

  1. Douglas said

    Hi Nicklas,

    I’ve just read your article about Global font size. I have a similar problem. I’d like to change the application locale.
    I’ve been using netbeans 7.0.1 and I put in my a run.args.extra=–locale pt:BR and voila… It worked very well. However, i need to install the application by Java Web Start. I added two lines similar you did in your example:


    I cleaned the java cached, but it didn’t work. Always the application runs with default locale (english).
    Do you have some idea how can I solve the problem?



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: