Solved

Jbutton border

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
stackato and cloud 4 85
oracle 11g 23 77
hibernate example for saving data 19 37
Convert from a json string array to a Java object 3 29
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

785 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