SpringLayout problem
From: Alex Ostrikov (aostrik_at_hotmail.com)
Date: 11/20/03
- Next message: Alex Ostrikov: "JNI question"
- Previous message: Jonas Kongslund: "Re: Validating user referring host"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 19 Nov 2003 22:35:55 -0500
Hello, all !!!
Could somebody explain, why my JDialog with SpringLayout doesn't work:
...
public class OptionsDialog extends JDialog
{
JLabel label;
public OptionsDialog()
{
Container pane = getContentPane();
SpringLayout layout = new SpringLayout();
pane.setLayout(layout);
label = new JLabel("Select plugins directory: ");
pane.add(label);
layout.putConstraint(SpringLayout.WEST, label, 20, SpringLayout.WEST,
pane);
layout.putConstraint(SpringLayout.NORTH, label, 20,
SpringLayout.NORTH, pane);
pack();
setVisible(true);
}
public static void main(String args[])
{
OptionsDialog dlg = new OptionsDialog();
}
}
Dialog has only title and no even space for label.
Thanx.
- Next message: Alex Ostrikov: "JNI question"
- Previous message: Jonas Kongslund: "Re: Validating user referring host"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]