This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Button.setBorder()