package com.yaka;

import javax.swing.*;
import java.awt.*;

class GridLayoutExample implements LayoutExample {
    @Override
    public JPanel getContent() {
        JPanel panel = new JPanel();

        GridLayout layout = new GridLayout(2, 3);
        panel.setLayout(layout);

        layout.setHgap(30);
        layout.setVgap(50);

        panel.add(new JButton("Patrick"));
        panel.add(new JButton("Bob"));
        panel.add(new JButton("Squidward"));
        panel.add(new JButton("Sandy"));
        panel.add(new JButton("Mr. Krabs"));
        panel.add(new JButton("Gary"));

        return panel;
    }

    @Override
    public String getName() {
        return "Grid Layout";
    }
}
