FileDocCategorySizeDatePackage
Borders.javaAPI DocExample3480Mon Apr 06 18:10:26 BST 1998c13.swing

Borders

public class Borders extends JPanel

Fields Summary
Constructors Summary
public Borders()

    setLayout(new GridLayout(2,4));
    add(showBorder(new TitledBorder("Title")));
    add(showBorder(new EtchedBorder()));
    add(showBorder(new LineBorder(Color.blue)));
    add(showBorder(
      new MatteBorder(5,5,30,30,Color.green)));
    add(showBorder(
      new BevelBorder(BevelBorder.RAISED)));
    add(showBorder(
      new SoftBevelBorder(BevelBorder.LOWERED)));
    add(showBorder(new CompoundBorder(
      new EtchedBorder(),
      new LineBorder(Color.red))));
  
Methods Summary
public static voidmain(java.lang.String[] args)

    Show.inFrame(new Borders(), 500, 300);
  
static JPanelshowBorder(Border b)

    JPanel jp = new JPanel();
    jp.setLayout(new BorderLayout());
    String nm = b.getClass().toString();
    nm = nm.substring(nm.lastIndexOf('.") + 1);
    jp.add(new JLabel(nm, JLabel.CENTER), 
      BorderLayout.CENTER);
    jp.setBorder(b);
    return jp;