Here you can find the source of changeFontToItalic(final JComponent component)
Parameter | Description |
---|---|
component | component whose font to be changed to ITALIC |
public static JComponent changeFontToItalic(final JComponent component)
//package com.java2s; //License from project: Apache License import java.awt.Font; import javax.swing.JComponent; public class Main { /**/*from ww w .j a v a 2 s . c o m*/ * Changes the font of a component to ITALIC. * @param component component whose font to be changed to ITALIC * @return the component */ public static JComponent changeFontToItalic(final JComponent component) { component.setFont(component.getFont().deriveFont(Font.ITALIC)); return component; } }