final SButton addTab = new SButton("add a tab"); addTab.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addTab(); } }); add(addTab); final SButton removeTab = new SButton("remove a tab"); removeTab.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeTab(); } }); add(removeTab);
        public TabbedPaneControls() {            final SCheckBox showAsFormComponent = new SCheckBox("Show as Form Component");            showAsFormComponent.addActionListener(new ActionListener() {                public void actionPerformed(ActionEvent e) {                    tabbedPane.setShowAsFormComponent(showAsFormComponent.isSelected());                }            });            add(showAsFormComponent);        }