Intro
It doesn’t matter how careful you are. It doesn’t matter if you bag each piece as you remove it. You can take all the pictures you want. You’ll still wind up with one or two screws left over.
Log4J + Glass Fish
Some things are just there to aggravate you. I deployed my new webapp, hit the page, and I got an error. No problem, I popped open the Glass Fish admin console and brought up the log. What do you mean no records found?
Misbehaving CardLayout
CardLayout works great as long as the “cards” are all about the same size. However, when a panel using CardLayout contains a very large component and a very small component, there can be some unpleasant behaviors.
When added to a JScrollPane, the the scroll bars worked very well when displaying the large JTable. But, the small component (a single button) was alsl displayed with scroll bars. Even worse, if there wass enough difference in size, it was be possible to entirely scroll the smaller content off screen.
This class provides a specific variation on a JPanel with a CardLayout that solves this behavior issue.
Handling wide content in a Combo Box
JComboBox works great when you need to offer a choice of “Thing one” or “Thing two”.
But what do you do when you need to offer a choice of:
“My super, fantastic, amazingly awesome, awesomely cool gadget” or
“My super, fantastic, amazingly awesome, awesomely cool widget“?
80 FPS in Java? Yes!
This comes from a recent question on StackOverflow where the poster asked whether it is possible to paint a 1024×768 window at 30fps. The answer is an enthusiastic Yes!.