Question

enter image description here

I am pretty new to java swing and i just started working on JTable. I want to create a JTable Which look like the above image? Can anybody help me beacause i am not so familiar with JTable?

Was it helpful?

Solution

Table Row Rendering shows how you can alternate the row colours.

OTHER TIPS

How can I achieve the border of the table header like the figure?

You can obtain a copy of the default table header renderer for a given L&F, as shown here, and modify it as desired. With some caveats, you can modify the renderer for a particular TableColumn, as shown here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top