How to make Circle image Label in Java?
I wanna make circle image Label But I can't do this.. Hey guys Help me..T.T
I tried make circle panel for add image icon but that didn't work.
help me please...
解决方案
I think you should change your tack, instead of trying to modify the output of a component, instead, modify the input...
So all this does, is apply a circular (alpha based) mask to another image
BufferedImage master = ImageIO.read(new File("/Volumes/Disk02/Dropbox/MegaTokyo/thumnails/megatokyo_omnibus_1_3_cover_by_fredrin-d4oupef.jpg"));
int diameter = Math.min(master.getWidth(), master.getHeight());
BufferedImage mask = new BufferedImage(master.getWidth(), master.getHeight(), BufferedImage.TYPE_INT_ARGB);