File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Button.setBorder()

 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MatteBorder
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.swing.BorderFactory

button.setBorder(BorderFactory.create......);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic