Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting margins JLabel cell in JTable

843785Nov 28 2008 — edited Nov 28 2008
Hi,

I have a JTable filled with cells. The cells contain a JLabel. What I wish to do is give the labels a margin from the right.

setIntercellSpacing gives a margin for both sides. I want only one side.
Besides that, when selecting a row, the "spacing" area's aren't given the blue selection colour.

What im looking for is a setMargin(x1, x2, y1, y2) where x1 is left, x2 is right, y1 is top and y2 is bottom.

Is something like this possible and how should I approach this?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2008
Added on Nov 28 2008
6 comments
739 views