Question

I'd like to know how to change the default font used in netbeans platform. I'm not asking for changing the font in the Netbeans IDE but in the platform, then all my derived applications would use this default font.

A netbeans application is a group of Jcomponent so i could easily set the font of each of those components but there is still things like notifications that i can't access directly to change the font, so i think the best would be to change the font by default. Programmaticaly or any other way... maybe editing one the jar?

Was it helpful?

Solution

type and size of Font are diferrent by platform and used Look and Feel, there are these possibilities

and/or with

or

have look at UImanager default by @camickr

OTHER TIPS

If you are looking to change the 'editor' fonts in platform applications, (i do use some of NB editors in my platform application), here is the way.

create a file org-netbeans-modules-editor-settings-CustomFontsColors.xml with the following contents,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
<fontscolors>
    <fontcolor bgColor="white" foreColor="black" name="default">
        <font name="Noto Serif CJK JP" size="15"/>
    </fontcolor>
</fontscolors>

and in your layer.xml file,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
     <folder name="Editors">
        <folder name="NetBeans">
            <folder name="Defaults">
                <file name="defaultColoring.xml" url="org-netbeans-modules-editor-settings-CustomFontsColors.xml"/>
            </folder>
        </folder>
     </folder>
</filesystem>

That's all.

PS: You can also check the source here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top