Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How can I set border for the cell of table?  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have used Intercellspacing for a table so that I can keep some margin with cells of a table. In the attached picture, How can I set a border around the selected area of cell?
Webp.net-resizeimage-(1).jpg
[Thumbnail for Webp.net-resizeimage-(1).jpg]
 
Rancher
Posts: 3040
22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read the answer to your last question?

You were given a link to the Swing tutorial on "How to Use Tables".

In the tutorial they discuss the concept of using "renderers" to display the data. So you can use a custom renderer with a Border.

However, I don't think this will remove the white space because you have set the intercell spacing.
 
Dp Chovati
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob, thanks for sharing tutorial. I am referring to that.
 
Marshal
Posts: 24460
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's really amazing how much of that sort of information is packed into those old Oracle tutorials. Almost every question you have about Swing, you can find in there.

However don't plan on finding the answer to a random question in a couple of minutes, which is what people normally want. It would probably take you a few hours (or a few days) to work your way through the tutorial and understand the answer properly, but really it's worth spending that time. We see a lot of questions here which contain horrible Swing code which doesn't work because the writer of the code didn't understand the basics of Swing. Often the only answer is "Throw that code away and start again after reading the tutorials." But it looks like you haven't progressed to that point yet.
 
Marshal
Posts: 64471
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham wrote:. . . work your way through the tutorial and understand the answer properly . . .

Even if you go through it quickly and don't understand the code, you an remember which section says what, and go back to it when you need it.
 
I AM MIGHTY! Especially when I hold this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!