01: /**
02: * L2FProd.com Common Components 7.3 License.
03: *
04: * Copyright 2005-2007 L2FProd.com
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package com.l2fprod.common.demo;
18:
19: import com.l2fprod.common.swing.LookAndFeelTweaks;
20: import com.l2fprod.common.util.ResourceManager;
21:
22: import java.awt.BorderLayout;
23:
24: import javax.swing.JFrame;
25: import javax.swing.JPanel;
26: import javax.swing.JTabbedPane;
27: import javax.swing.UIManager;
28:
29: /**
30: * Demo showing the PropertySheet.<br>
31: *
32: */
33: public class PropertySheetMain extends JPanel {
34:
35: static ResourceManager RESOURCE = ResourceManager
36: .get(PropertySheetMain.class);
37:
38: public PropertySheetMain() {
39: setLayout(new BorderLayout());
40:
41: JTabbedPane tabs = new JTabbedPane();
42: tabs.add("Sheet 1", new PropertySheetPage());
43: tabs.add("Sheet 2", new PropertySheetPage2());
44: tabs.add("Sheet 3", new PropertySheetPage3());
45:
46: add("Center", tabs);
47: }
48:
49: public static void main(String[] args) throws Exception {
50: UIManager.setLookAndFeel(UIManager
51: .getSystemLookAndFeelClassName());
52: LookAndFeelTweaks.tweak();
53:
54: JFrame frame = new JFrame("PropertySheet");
55: frame.getContentPane().setLayout(new BorderLayout());
56: frame.getContentPane().add("Center", new PropertySheetMain());
57: frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
58: frame.pack();
59: frame.setLocation(100, 100);
60: frame.setVisible(true);
61: }
62:
63: }
|