Solved

Jbutton border

Posted on 2006-07-05
3
417 Views
Last Modified: 2010-08-05
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
Comment
Question by:List244
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 17047794
Border b = button.getBorder();
if (b instanceof BevelBorder) {
    BevelBorder bb = (BevelBorder) b;
    if (bb.getBevelType()==0) {
       //
    else if (bb.getBevelType()==1) {
       //
    }
}


0
 
LVL 8

Author Comment

by:List244
ID: 17047808
Which import would be used for BevelBorder?
0
 
LVL 92

Expert Comment

by:objects
ID: 17047834
javax.swing.border.BevelBorder
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now