Java JComponent Width setMinimumWidth(JComponent component, int minWidth)

Here you can find the source of setMinimumWidth(JComponent component, int minWidth)

Description

set Minimum Width

License

Apache License

Declaration

public static void setMinimumWidth(JComponent component, int minWidth) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.Dimension;

import javax.swing.JComponent;

public class Main {
    public static void setMinimumWidth(JComponent component, int minWidth) {
        Dimension dim = component.getMinimumSize();
        dim = new Dimension(minWidth, dim.height);
        component.setMinimumSize(dim);/*from   w w w  .j ava2s.  co m*/
    }
}

Related

  1. setComponent3Width(JComponent c, int width)
  2. setComponentWidth(final JComponent component, final int width)
  3. setMaximumWidth(final JComponent component, final int width)
  4. setMaximumWidth(JComponent component, int width)
  5. setMaxWidth(JComponent comp, int width)
  6. setMinimumWidth(JComponent component, int width)
  7. setPreferredWidth(final JComponent component, final int width)
  8. setPreferredWidth(final JComponent component, final int width)
  9. setPreferredWidth(int width, JComponent... components)