I have the following code to make a custom looking JButton
ImageIcon icon = createImageIcon(
CommonUtils.class.getClassLoader().getResource("images/wright.png")
);
RightSlide.setIcon( icon );
ImageIcon icon2 = createImageIcon(
CommonUtils.class.getClassLoader().getResource("images/right_selected.png")
);
RightSlide.setPressedIcon( icon2);
RightSlide.setSelectedIcon(icon2);
RightSlide.setRolloverEnabled(true); // turn on before rollovers work
RightSlide.setRolloverIcon(icon2);
RightSlide.setBorderPainted(false);
RightSlide.setFocusPainted(false);
RightSlide.addActionListener(new ActionListener(){
The code generates a custom button. The button behaves as expected when hover over, pressed, clicked, and selected. This works on MacOS and Linux (Ubuntu). But the same code has a light blue background on Windows. Where does this come from and how do I get rid of it ?
Thanks