import com.toedter.calendar.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class JCTest{
JFrame f;
JLabel label;
JCalendar jc;
JButton but;
public JCTest(){
f = new JFrame("JCTest");
label = new JLabel("__ / __ / ____");
jc = new JCalendar();
but = new JButton("Fecha!!");
f.getContentPane().setLayout(new FlowLayout());
f.getContentPane().add(jc);
f.getContentPane().add(label);
f.getContentPane().add(but);
but.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
label.setText(jc.getDayChooser().getDay() + " / " +
(jc.getMonthChooser().getMonth() + 1) + " / " +
jc.getYearChooser().getYear());
}
});
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.pack();
f.setVisible(true);
}
public static void main (String args[]){
JCTest jct = new JCTest();
}
}