public static void changeFont(JComponent comp,int style){
  Font font=comp.getFont();
  comp.setFont(font.deriveFont(style));
}

public static void changeFont ( JComponent comp , int style ) { Font font = comp . getFont ( ) ; comp . setFont ( font . deriveFont ( style ) ) ; }
change the font style of a component
