aspose file tools*
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
Author

Button.setBorder()

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
MatteBorder
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

javax.swing.BorderFactory

button.setBorder(BorderFactory.create......);


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Button.setBorder()
 
Similar Threads
Developing servlets using Eclipse 3.3.2
Directory creation date
JRadioButtons in applet
MouseDragg
JButton with no Border