posted 18 years ago
i got that, i used BoxLayout like this
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
and while adding the buttons
panel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
panel.add(b1);
panel.add(Box.createRigidArea(new Dimension(0,5)));
panel.add(b2);
panel.add(Box.createRigidArea(new Dimension(0,5)));
panel.add(b3);
panel.add(Box.createRigidArea(new Dimension(0,5)));
panel.add(b4);
Cheers,
Sudha C Reddi
http://techelp.in