Hi everyone,
Well, I have an image that I would like to put as a background to a button (or something clicable). The problem is that this image is round, so I needed to show this image, without any borders and etc.
The JComponent that holds this button have a custom background, so the button really need to only show the image.
After searching google, I couldnt manage to do so, I have tryed all the following but with no luck:
button.setBorderPainted(false);
button.setContentAreaFilled(false);
button.setOpaque(true);
And after I paint the icon at the background, the button paints it, but holds an ugly gray background with borders and etc. I have also tried to use a JLabel and a JButton. And to paint an ImageIcon at it, but if the user resizes or minimizes the window, the icons disappear!
Please, does anyone have a clue on this? I just need to paint and round image to a JComponent and listen for clicks at it..