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

JTable row limitation

I have to limit the number of rows in a JTable. If i have 100 records i need to display 10 on the initial loading of JTable. Use preferred size (+ an appropriate layout and layout constraint) to fix the size. I wish to put a button like “next”, and after each click it showing … Read more