Java JLabel Size resizeLabel(JLabel label, Dimension newDim)

Here you can find the source of resizeLabel(JLabel label, Dimension newDim)

Description

resize Label

License

Open Source License

Declaration

public static void resizeLabel(JLabel label, Dimension newDim) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Dimension;

import javax.swing.JLabel;

public class Main {
    public static void resizeLabel(JLabel label, Dimension newDim) {
        label.setPreferredSize(newDim);/*from w w w.  j  av a 2  s .c  o  m*/
    }
}

Related

  1. adjustLabelSizes(List labels)
  2. getLabelPreferredSize(JLabel label)
  3. getPreferredLabelSize(JLabel c, int widthHint)
  4. getPreferredSize(JLabel label)
  5. makeSameSize(int alignment, JLabel... labels)