Java JComponent Size setSize(JComponent conponent, int width, int height)

Here you can find the source of setSize(JComponent conponent, int width, int height)

Description

set Size

License

Apache License

Declaration

public static void setSize(JComponent conponent, int width, int height) 

Method Source Code

//package com.java2s;
/*//from   ww  w.  ja  v  a2  s . c  om
 * codjo.net
 *
 * Common Apache License 2.0
 */

import java.awt.Dimension;

import javax.swing.JComponent;

public class Main {
    public static void setSize(JComponent conponent, int width, int height) {
        conponent.setMinimumSize(new Dimension(width, height));
        conponent.setPreferredSize(new Dimension(width, height));
    }
}

Related

  1. setSize(JComponent c, int w)
  2. setSize(JComponent comp, int w, int h)
  3. setSize(JComponent componenet, Dimension dimension)
  4. setSize(JComponent componenet, Dimension dimension)
  5. setSize(JComponent component, int width, int height)
  6. setSizeBasedOnResolution(final JComponent component)
  7. setSizes(JComponent[] components, final Dimension dimension)
  8. setSMPSizes(JComponent comp, Dimension d)
  9. setUnlimitedSize(JComponent component)