psukys
psukys

Reputation: 389

Java: GridLayout add to specific cell

how to add data to specific cell for example ([*] indicates a cell): [JButton1] [JButton2] [] [] [JButton3]

Or is there any better solution rather than using null layout to get similar result - giving a gap.

Upvotes: 0

Views: 1663

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168835

GridLayout of JPanels each with a CardLayout. When you want something to appear in a particular x,y position, add it to the JPanel and show that card.

Upvotes: 1

Related Questions