1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| /**
* @author Iyoiyo
*/
public class TestJCalendar
{
/** */
static private JCalendar jCalendar = null;
/**
* @param args
*/
public static void main(String[] args)
{
// Display the frame with the main panel inside
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
// Create and set up the window.
JFrame frame = new JFrame("Test JCalendar");
frame.setLayout(new GridBagLayout());
Insets insets0000 = new Insets(0, 0, 0, 0);
GridBagConstraints c;
jCalendar = new JCalendar();
c = new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insets0000, 0, 0);
frame.getContentPane().add(jCalendar, c);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
});
}
} |
Partager