I have this tiny flag that I am using for an icon on the default JButton. But when I load it it keeps the white box that is around it which shows up on the JButton’s blue background (at least that’s the color for me). I was wondering how I remove this white color.

Of course, Siddhartha Shankar provided the correct answer, and mKorbel suggested a good (lateral thinking) alternative, but I was compelled to post this simply because ‘we have the technology’. 😉
BTW – you can combine my suggestion with that of Siddhartha by using
ImageIO.write(), using the image formed from these shenanigans.