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 border Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "border" Watch "border" New topic


hari thatikonda

Joined: Sep 09, 2004
Posts: 11
is there any way that i can set the single color border only on defined sides instead of four sides. i need to set border only three side of one component and only two sides of other
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
Have a look at

BorderFactory.createMatteBorder(0, 0, 0, 1, theColor)

Where the parameters are (int top, int left, int bottom, int right, Color color)

hari thatikonda

Joined: Sep 09, 2004
Posts: 11
hi i am using 1.3edition i ouldnt find out that method. thanks anyway
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: border
Similar Threads
Cant able to set Background color for panel..
setting the different colors for line border
JSplitPane & window resizing
Setting the JFrame contentpane's border
Swing borders