File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Button.setBorder() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Button.setBorder()" Watch "Button.setBorder()" New topic


chander shivdasani
Ranch Hand

Joined: Oct 09, 2007
Posts: 206

I have a button. Currently there are no borders to it. I want to add a border to my button, but just on one side. Either Left or right.
I was going through the api's and i found something called as setBorder(Border b).

This function takes an Object of type Border. I searched through the api's but couldnt find way to create an instance of a class that has border on just one side.And also i would like to add color to that border.

Is there a way to do it?

Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302



GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: Button.setBorder()
It's not a secret anymore!