Create a new spring by adding two springs using the sum() method - Java Swing

Java examples for Swing:SpringLayout

Description

Create a new spring by adding two springs using the sum() method

Demo Code

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

public class Main {
  public static void main(String[] args) {
    JButton c1 = new JButton();
    Spring s2 = Spring.height(c1);

    Spring s3 = Spring.sum(s2, s2);

  }/* w w  w  . java 2s . c  o  m*/
}

Related Tutorials