added a constructor that takes a dimension

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1087 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2003-04-01 11:04:18 +00:00
parent 718cd99144
commit d0128668b3
@@ -1,5 +1,5 @@
//
// $Id: Spacer.java,v 1.1 2002/04/30 02:31:09 mdb Exp $
// $Id: Spacer.java,v 1.2 2003/04/01 11:04:18 ray Exp $
package com.samskivert.swing;
@@ -17,7 +17,15 @@ public class Spacer extends JPanel
*/
public Spacer (int width, int height)
{
setPreferredSize(new Dimension(width, height));
this(new Dimension(width, height));
}
/**
* Constructs a spacer with the specified width and height.
*/
public Spacer (Dimension d)
{
setPreferredSize(d);
setOpaque(false);
}
}