How To Remove Recent Of Swatch Tab In JColorChooser

There is no direct way to do this based on the JColorChooser API so we will have to do it old style.

The getComponent(0) refers to the first tab of the JColorChooser, in this case the swatch tab. The remove() method is called twice on index number 1 and 2 because 1 is the JLabel while 2 is the recent color history.

That’s it. That should give you a swatch content only tab.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *