FileDocCategorySizeDatePackage
ImageBorderHack.javaAPI DocExample1208Mon Jan 09 11:01:58 GMT 2006None

ImageBorderHack

public class ImageBorderHack extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        JFrame frame = new JFrame("Hack #59: Image Border");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();
        JButton button = new JButton("Image Border Test");
        panel.add(button);
        
        ImageBorder image_border = new ImageBorder(
            new ImageIcon("images/upper_left.png").getImage(),
            new ImageIcon("images/upper.png").getImage(),
            new ImageIcon("images/upper_right.png").getImage(),

            new ImageIcon("images/left_center.png").getImage(),
            new ImageIcon("images/right_center.png").getImage(),

            new ImageIcon("images/bottom_left.png").getImage(),
            new ImageIcon("images/bottom_center.png").getImage(),
            new ImageIcon("images/bottom_right.png").getImage()
            );
        panel.setBorder(image_border);

        
        frame.getContentPane().add(panel);
        frame.pack();
        //frame.setSize(200,200);
        frame.setVisible(true);