Rob Prime wrote:It's a bit worrying how you can mangle components like a JTable by adding a JLabel to it directly, or a JSpinner by changing its layout manager.
Then don't do it.
Thats what makes Swing so powerfull, the ability to customize almost anything. Of course with great power comes great responsibility.
I gave the OP multiple choices. Its up to them to understand the pro's and con's of each and make an informed decision.
This is a simple suggestion for a JLabel not a JTable. However, how do you think the editor works on a JTable? The editor is added to the table at the appropriate cell location. So even the designers of the JDK take advantage of adding child components to a parent container.