Java examples for Swing:SpringLayout
Get a fraction of another spring using the scale() 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 fractionSpring = Spring.scale(s2, 0.40f); }// ww w. jav a 2 s .c o m }