[API Review] RT-16288: Add a TextField.setFont method

Richard Bair richard.bair at oracle.com
Wed Jan 23 14:30:41 PST 2013

This is a quick and easy one. http://javafx-jira.kenai.com/browse/RT-16288

Labeled controls have a font property. TextInputControls also have a font property but it is not public API, except from CSS. My proposal here is just to make the font property public on TextInputControl, so that TextFields, TextAreas, PasswordFields, etc can all have their font specified in code.

The spec here is the same as for Labeled:

     * The default font to use for text in the TextInputControl. If the TextInputControl's text is
     * rich text then this font may or may not be used depending on the font
     * information embedded in the rich text, but in any case where a default
     * font is required, this font will be used.
    public final ObjectProperty<Font> fontProperty() {

More information about the openjfx-dev mailing list