Create a spring from the width of a component named c1 - Java Swing

Java examples for Swing:SpringLayout

Description

Create a spring from the width of a component named c1

Demo Code

import javax.swing.JButton;
import javax.swing.Spring;

public class Main {
  public static void main(String[] args) {
    JButton c1 = new JButton();
    Spring s1 = Spring.width(c1);
  }//w w  w  . jav a 2 s.c om
}

Related Tutorials