public TimeSelector(Calendar cal, DateTimeSelector sel) {
		calendar = cal;
		dts = sel;
		hour = calendar.get(Calendar.HOUR_OF_DAY);
		min = calendar.get(Calendar.MINUTE);
		sec = calendar.get(Calendar.SECOND);
		time = new JLabel("", JLabel.CENTER);
		updateTime();

		timename = new JLabel("ʱ                      ", JLabel.CENTER);

		JPanel up = new JPanel(new BorderLayout());
		up.add(time, BorderLayout.NORTH);
		up.add(timename, BorderLayout.CENTER);

		hSlider = new JSlider(JSlider.VERTICAL, 0, 23,
				calendar.get(Calendar.HOUR_OF_DAY));
		mSlider = new JSlider(JSlider.VERTICAL, 0, 59,
				calendar.get(Calendar.MINUTE));
		sSlider = new JSlider(JSlider.VERTICAL, 0, 59,
				calendar.get(Calendar.SECOND));

		hSlider.addChangeListener(new ChangeListener() {

			@Override
			public void stateChanged(ChangeEvent arg0) {
				// TODO Auto-generated method stub
				int temp = hSlider.getValue();
				if(hour!=temp){
					hour = temp;
					updateTime();
				}
			}
		});

		mSlider.addChangeListener(new ChangeListener() {
			@Override
			public void stateChanged(ChangeEvent arg0) {
				// TODO Auto-generated method stub
				int temp = mSlider.getValue();
				if(min!=temp){
					min = temp;
					updateTime();
				}
			}
		});

		sSlider.addChangeListener(new ChangeListener() {

			@Override
			public void stateChanged(ChangeEvent e) {
				// TODO Auto-generated method stub
				int temp = sSlider.getValue();
				if(sec!=temp){
					sec = temp;
					updateTime();
				}
				
			}
		});

		JPanel down = new JPanel(new GridLayout(1, 3));
		down.add(hSlider);
		down.add(mSlider);
		down.add(sSlider);

		this.setLayout(new BorderLayout());
		this.setBorder(BorderFactory.createLineBorder(Color.gray));
		this.setPreferredSize(new Dimension(150, 200));
		this.add(up, BorderLayout.NORTH);
		this.add(down, BorderLayout.CENTER);
		this.setBorder(BorderFactory.createLineBorder(Color.gray));
		this.setVisible(true);
	}