<<< Tool Tips | Index | Extending the JFrame class >>> |
Creates an object that holds typeface and size information
Font constructor arguments: typeface, style, and point size.
For example, changing a JButton's font requires Font object argument:
// Create frame // ... // Add button and set font: JButton button = new JButton( "Hello" ); Font headlineFont = new Font( "Arial", Font.BOLD, 36 ); button.setFont( headlineFont ); frame.getContentPane().add( button ); frame.setVisible( true );
<<< Tool Tips | Index | Extending the JFrame class >>> |