Java JComponent Size setSize(JComponent componenet, Dimension dimension)

Here you can find the source of setSize(JComponent componenet, Dimension dimension)

Description

set Size

License

LGPL

Declaration

public static void setSize(JComponent componenet, Dimension dimension) 

Method Source Code

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

import java.awt.*;
import javax.swing.*;

public class Main {
    public static void setSize(JComponent componenet, Dimension dimension) {
        componenet.setMinimumSize(dimension);
        componenet.setMaximumSize(dimension);
        componenet.setPreferredSize(dimension);
    }/*from   w  ww. jav  a  2s . c  o  m*/
}

Related

  1. setPreferredSize(JComponent comp, int height, int width)
  2. setSize(Dimension size, JComponent[] components)
  3. setSize(final Component component, final int width, final int height)
  4. setSize(JComponent c, int w)
  5. setSize(JComponent comp, int w, int h)
  6. setSize(JComponent componenet, Dimension dimension)
  7. setSize(JComponent component, int width, int height)
  8. setSize(JComponent conponent, int width, int height)
  9. setSizeBasedOnResolution(final JComponent component)