Archive

Posts Tagged ‘Swing’

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…

Categories: Swing Tags: , , , ,

Paint faster!

August 29, 2010 1 comment

It’s been a while since I came across this stuff and I already wrote about it on a company blog in the German language, but I thought this could be interesting enough for more people out there, so I’m sitting here translating what I wrote almost 2 years ago, keen on validating it with today’s Java Runtime. So what’s this fuzz about? Simply put: I noticed that you might have wasted a lot of time in swing, if you relied on the Graphics-object you get passed by Swing and the difference was dramatic!
Read more…

Categories: Swing Tags: , , ,