Exemple #1
0
  public <T extends JComponent> T addFixed(T component) {
    if (!(component instanceof JButton)) UISupport.setPreferredHeight(component, 18);

    Dimension preferredSize = component.getPreferredSize();
    component.setMinimumSize(preferredSize);
    component.setMaximumSize(preferredSize);

    add(component);

    return component;
  }
Exemple #2
0
  public Component add(Component component) {
    if (!(component instanceof AbstractButton)) UISupport.setPreferredHeight(component, 18);

    return super.add(component);
  }