hi all
i am trying to set the size of the button...i am using GridLayout
i tried button.setSize and button.setPreferredSize but it is not working...what to do????
Printable View
hi all
i am trying to set the size of the button...i am using GridLayout
i tried button.setSize and button.setPreferredSize but it is not working...what to do????
When you use GridLayout, the layout will force the components to be a certain size. One way to solve this is to place the JButton into a JPanel and then the JPanel into the grid.
You're welcome.