ABevelBorderLoweredBevelBorderRAISED.java Source code

Java tutorial

Introduction

Here is the source code for ABevelBorderLoweredBevelBorderRAISED.java

Source

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;

public class ABevelBorderLoweredBevelBorderRAISED {
    public static void main(String args[]) {
        JFrame frame = new JFrame("Bevel Borders");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Border myRaisedBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.PINK, Color.RED);
        //    Border myLoweredBorder = BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.PINK,
        //      Color.RED);

        JButton button = new JButton("Raised");
        button.setBorder(myRaisedBorder);
        frame.add(button);

        frame.setSize(300, 100);
        frame.setVisible(true);
    }
}