This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I guess you can use 2 separate gifs. 1 for normal state and other for pressed state(i.e. when button is pressed) See the code for Swing : BTNGo.setIcon(new javax.swing.ImageIcon(getClass().getResource("normal.gif"))); BTNGo.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("pressed.gif")));
Yeah, you'd need to use Swing - the appearance of buttons in AWT is set by the OS. If you need to use AWT, there might be some way of stopping the button recieving events once it's depressed, so it never changes it's appearance.