01: import java.awt.*;
02: import javax.swing.*;
03: 
04: /**
05:    This program tests the property sheet by displaying a 
06:    slider and a property sheet to edit the slider's properties.
07: */
08: public class PropertySheetTest
09: {
10:    public static void main(String[] args)
11:    {
12:       JFrame frame = new JFrame();
13:       Component comp = new JSlider();
14:       frame.getContentPane().add(comp);
15:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
16:       frame.pack();
17:       frame.show();
18: 
19:       JPanel editor = new PropertySheet(comp);
20:       JComponent pane = new JScrollPane(editor);
21:       pane.setPreferredSize(new Dimension(400, 300));
22:       JOptionPane.showMessageDialog(frame, pane);
23:    }
24: }