Solved

Jbutton border

Posted on 2006-07-05
3
424 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SHA2 certs for IIS AND Java? 2 136
Java Restore security prompts not working 10 262
spring maven example issues 3 106
Find out all repos that a user is most active on Github 1 58
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

751 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