2
* Copyright (c) 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.
2
* Copyright (c) 2002-2009 JGoodies Karsten Lentzsch. All Rights Reserved.
4
4
* Redistribution and use in source and binary forms, with or without
5
5
* modification, are permitted provided that the following conditions are met:
39
39
import com.jgoodies.forms.factories.Borders;
40
40
import com.jgoodies.forms.layout.CellConstraints;
41
41
import com.jgoodies.forms.layout.FormLayout;
42
import com.jgoodies.forms.tutorial.util.TutorialApplication;
44
45
* Demonstrates how to build button stacks using the ButtonStackBuilder.
46
47
* @author Karsten Lentzsch
47
* @version $Revision: 1.19 $
48
* @version $Revision: 1.23 $
49
50
* @see ButtonStackBuilder
51
public final class ButtonStacksExample {
52
public final class ButtonStacksExample extends TutorialApplication {
55
// Launching **************************************************************
53
57
public static void main(String[] args) {
55
UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
56
} catch (Exception e) {
57
// Likely PlasticXP is not in the class path; ignore.
59
JFrame frame = new JFrame();
60
frame.setTitle("Forms Tutorial :: Button Stacks");
61
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
62
JComponent panel = new ButtonStacksExample().buildPanel();
63
frame.getContentPane().add(panel);
65
frame.setVisible(true);
58
TutorialApplication.launch(ButtonStacksExample.class, args);
62
protected void startup(String[] args) {
63
JFrame frame = createFrame("Forms Tutorial :: Button Stacks");
64
frame.getContentPane().add(buildPanel());
65
packAndShowOnScreenCenter(frame);
69
// Building ***************************************************************
69
71
public JComponent buildPanel() {
70
72
JTabbedPane tabbedPane = new JTabbedPane();