Have you tried setting JButton.setOpaque(true)?

JButton button = new JButton("test");
button.setBackground(Color.RED);
button.setOpaque(true);

Leave a Reply

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