Are you refering to implementing a toggle button on the PLC or are you talking aout the visual "button" on Java AWT?
If you are refering to the PLC, then there are many ways of doing it. If you use the M-series, the built-in "ToggleIO" command does exactly that. Executing the ToggleIO on any I/O label name will change it from OFF to ON or from ON to OFF.
See other examples in the "Toggle_Switch.PC5" file which we listed 3 methods of doing so.
If you are refering to Java AWT. You may have to create your own 3D button graphic and in your code you select whether the 3D is recessed positively or negatively or changes it color to give it the "pressed down" look. Ask some other Java Guru and you may get better suggestions.