Archive

Posts Tagged ‘JTable’

A properly sized JTable

February 16, 2013 2 comments

Task: Create a table with two columns. The columns should fit the size of the content. If the table’s width is smaller than the panel, make the last column fill the panel, if the table is wider than the panel, show horizontal scrollbars. Sounds so easy? How many of you have wasted a good amount of time making a table behave like this? The good thing is: it is easy. And here is how it works. Read more…

Advertisements
Categories: Swing Tags: , , , ,