summaryrefslogtreecommitdiffstats
path: root/src/cppcheckplus/tab/MyTabPage1.java
blob: d20b78c8441cf9aad2aa1ca436fb29466f4e5033 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package cppcheckplus.tab;

import java.awt.BorderLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;

public class MyTabPage1 extends JPanel {
    private JPanel centerPane;

    public MyTabPage1() {
        this(null);
    }

    public MyTabPage1(JComponent contentComponent) {
        centerPane = new JPanel(new BorderLayout());
        init(contentComponent);
    }

    private void init(JComponent contentComponent) {
        setLayout(new BorderLayout());
        add(centerPane, "Center");
        if (contentComponent != null) {
            centerPane.add(contentComponent, "Center");
        }
    }

    public JPanel getCenterPane() {
        return centerPane;
    }

}