Basic, basic question re: button coloring (change from default blue)
Hi folks!
I wish to create a button which has a black background, and which - when pressed - still remains black. The code I have so far follows.
theButton =new JButton();
theButton.setBackground(Color.black);
theButton.setLocation(new Point(38, 13));
theButton.setSize(new Dimension(30, 35));
theButton.setRolloverEnabled(false);
theButton.setForeground(Color.black);
theButton.setBorderPainted(false);
theButton.setFocusPainted(false);
theButton.setToolTipText("Move Up");
theButton.setIcon(new ImageIcon(getClass().getResource("/iamabutton.gif")));
When this executes, the button does indeed have a black background (to make my .gif icon blend well ;) but when the user clicks the button, its background turns to the default light blue.
I've tried using my IDE's autocomplete feature to see what method call I can use to stop this - nothing. Java's documentation reveals nothing useful. Even a search of this site using the textfield at the top right of the screen hasn't found anything to help me.... it's pretty obvious from this that it's a really dumb question to be asking...
But, can anyone help me get rid of that blue on user-click, please? Perhaps an indication of what methods I should use to set my button's visual attributes, a tutorial... anything :)

