Solved

Jbutton border

Posted on 2006-07-05
3
427 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

615 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