BevelBorderRAISED.java Source code

Java tutorial

Introduction

Here is the source code for BevelBorderRAISED.java

Source

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

public class BevelBorderRAISED extends JFrame {

    public BevelBorderRAISED() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();
        JLabel label;

        label = new JLabel("Beveled (like a button)");
        label.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
        panel.add(label);

        getContentPane().add(panel);
        pack();
    }

    public static void main(String[] args) {
        BevelBorderRAISED s = new BevelBorderRAISED();
        s.setVisible(true);
    }
}