As a Swing developer for as many years as one can possibly be a Swing developer, I've identified a lot of patterns that I use in laying out components. For example, I often create components that are associated with a JLabel. I usually write:
JPanel panel = new JPanel(new BorderLayout());
panel.add(label, BorderLayout.NORTH);
panel.add(list, BorderLayout.CENTER);
I do this so often, that I've decided to create a class that contains my commonly-used layout idioms. Then I can simply say:
JPanel panel = LayoutPatterns.createNorthLabeledPanel(label, list);
...which reduces my typing load considerably.
So, now I have a class full of about 20 static methods. The class has no state - all context is passed in through the method parameters.
Besides Java's Math class, I haven't seen any classes that are composed entirely of static methods, and that have no state.
On one hand, this doesn't feel right. On the other hand, I don't see anything wrong with it.
Is this an okay pattern to use, or something that indicates a Code Smell? If this pattern were applied to a different domain, should I be concerned about multithreaded uses of a class of statics? Would you balk if you ever saw this in production-quality code?