home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / pr8adpl7 / spacedpanel.java < prev    next >
Encoding:
Java Source  |  1996-08-14  |  357 b   |  16 lines

  1. // SpacedPanel.java
  2. // Just like a normal panel, but with a bit more breathing room
  3. import java.awt.Panel;
  4. import java.awt.Insets;
  5.  
  6. public class SpacedPanel extends Panel
  7. {
  8.     int x,y;
  9.  
  10.     SpacedPanel() { x = y = 3; }
  11.     SpacedPanel(int s) { x = y = s; }
  12.     SpacedPanel(int sx, int sy) { x = sx; y = sy; }
  13.     public Insets insets() { return new Insets(y,x,y,x); }
  14. }
  15.  
  16.