Swing JToolbarButton pressing

As mentioned in Costis’ reply, you are probably after a JToggleButton. It might also be necessary to suppress the painting of the border, as in the 2nd tool bar in this example. import java.awt.*; import java.awt.image.*; import javax.swing.*; class ToggleBar { public static JToggleButton getButton( Image selected, Image unselected, boolean decorated) { JToggleButton b = … Read more

tech