I want to know how do you combine or merge two grid position using Java grid layout. I am creating a basic java application using the java grid layout(0, 2) with my JFrame and java form components like JLabel and JButton. I want to combine the top two cells to displays my title in the center of the application.
How to combine two grid position in Java?
5.4k Views Asked by Ryan At
2
You can use GridBagLayout
In the above code Long Named Button 4 is spanned across 3 columns.
Reference:- How to use GridBagLayout