S
Scott Steiner
Hi,
I want to add a JPanel that has a border to a JFrame. Here's what I did:
public class Test2 extends JFrame
{
...
public Test2()
{
...
Container con = this.getContentPane();
con.setLayout(new BorderLayout());
JPanel pane = new JPanel();
pane.setBorder(BorderFactory.createEtchedBorder());
con.add(pane);
...
}
}
All is fine but the border of the panel is far too close to the border
of the frame. Is there some way of setting insets for the contentpane? I
saw a getInsets() method for the frame and for the contentpane but I see
nothing that would allow me to set the insets.
Thanks!
I want to add a JPanel that has a border to a JFrame. Here's what I did:
public class Test2 extends JFrame
{
...
public Test2()
{
...
Container con = this.getContentPane();
con.setLayout(new BorderLayout());
JPanel pane = new JPanel();
pane.setBorder(BorderFactory.createEtchedBorder());
con.add(pane);
...
}
}
All is fine but the border of the panel is far too close to the border
of the frame. Is there some way of setting insets for the contentpane? I
saw a getInsets() method for the frame and for the contentpane but I see
nothing that would allow me to set the insets.
Thanks!