Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

Jbutton border

I have a jbutton which either has a border style of BevelBorder(0) or BevelBorder(1); the border is created using
createBevelBorder(0) and createBevelBorder(1) respectively.  I would like to be able to check which type of border
my button has, how would I do so?
0
List244
Asked:
List244
  • 2
1 Solution
 
objectsCommented:
Border b = button.getBorder();
if (b instanceof BevelBorder) {
    BevelBorder bb = (BevelBorder) b;
    if (bb.getBevelType()==0) {
       //
    else if (bb.getBevelType()==1) {
       //
    }
}


0
 
List244Author Commented:
Which import would be used for BevelBorder?
0
 
objectsCommented:
javax.swing.border.BevelBorder
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now