JComponent code cleaning