Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2006

Tip: Looking for answers? Try searching our database.

Cells with rouded corners in JTable

Thread view: 
Chanchal - 15 Mar 2006 07:25 GMT
hi all,

can some one please tell me how can i have cells with rouded corners in
a JTable. i think i need to write a cell renderer for that. but how
exactly it should be done, and can i use some image with rouded corners
to do that etc etc... Please advice. Thanks in advance

Chanchal
Roedy Green - 15 Mar 2006 20:21 GMT
>can some one please tell me how can i have cells with rouded corners in
>a JTable. i think i need to write a cell renderer for that. but how
>exactly it should be done, and can i use some image with rouded corners
>to do that etc etc... Please advice. Thanks in advance

I think the easiest way to do that would be to render the background
yourself at the paintComponent level.  You might study the code Sun
uses for creating rounded buttons.

The fastest code would pre-draw square images for the corners.  Blast
the background to a single colour with fillRectangle then plop your
corners in on top.  You could even prepare the corners in a paint
program with anti-aliasing or other fancy effects.

also check out http://mindprod.com/jgloss/border.html to see what is
available canned to use.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.