List of usage examples for javax.swing JToolBar revalidate
public void revalidate()
From source file:Main.java
/** * Turns on display of text in all child buttons within the * {@link JToolBar}./*from w w w .j a v a2 s . c o m*/ * * @param toolBar * @param show */ public static void showText(JToolBar toolBar, boolean show) { for (Component comp : toolBar.getComponents()) { if (comp instanceof AbstractButton) { ((AbstractButton) comp).putClientProperty("hideActionText", Boolean.valueOf(show)); } } toolBar.revalidate(); }