Posts by devon:
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.
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“?
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!.