Java examples for Swing:SpringLayout
Create a new spring by adding two springs using the sum() method
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*/ }