Here you can find the source of boldFont(JComponent component)
Parameter | Description |
---|---|
component | component. |
public static JComponent boldFont(JComponent component)
//package com.java2s; // the terms of the GNU General Public License as published by the Free Software Foundation; import javax.swing.*; import java.awt.*; public class Main { /**/* w w w . j a v a 2s . c om*/ * Updates a font in a component to be bold. * * @param component component. * * @return component for chaining */ public static JComponent boldFont(JComponent component) { if (component == null) return null; component.setFont(component.getFont().deriveFont(Font.BOLD)); return component; } }