Skip to main content

How to create 3 columns and 2 rows tablelayout in Java?

1 reply [Last post]
mrnewbie
Offline
Joined: 2010-07-16
Points: 0

Dear The Expert,

How to create 3 columns and 2 rows tablelayout in Java?

please help

thanks & regards
newbiejava

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
walterln
Offline
Joined: 2007-04-16
Points: 0

[code]GridLayout layout = new GridLayout(2, 3);[/code]

Although then all cells will be the same size - if that is not what you want use a GridBagLayout (search for tutorial) or a third party layout like (surprise) TableLayout or MiGLayout.