本文整理汇总了Java中com.toedter.calendar.JSpinnerDateEditor类的典型用法代码示例。如果您正苦于以下问题:Java JSpinnerDateEditor类的具体用法?Java JSpinnerDateEditor怎么用?Java JSpinnerDateEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JSpinnerDateEditor类属于com.toedter.calendar包,在下文中一共展示了JSpinnerDateEditor类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DateChooserPanel
import com.toedter.calendar.JSpinnerDateEditor; //导入依赖的package包/类
public DateChooserPanel() {
setName("JDateChooser");
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
setLayout(gridbag);
components = new JComponent[6];
components[0] = new JDateChooser();
components[1] = new JDateChooser();
((JDateChooser) components[1]).getJCalendar().getDayChooser()
.addDateEvaluator(new BirthdayEvaluator());
((JDateChooser) components[1]).getJCalendar().getDayChooser()
.addDateEvaluator(new TestDateEvaluator());
((JDateChooser) components[1]).getJCalendar().setTodayButtonVisible(
true);
((JDateChooser) components[1]).getJCalendar().setNullDateButtonVisible(
true);
components[2] = new JDateChooser(new Date());
components[3] = new JDateChooser(null, null, null,
new JSpinnerDateEditor());
components[4] = new JDateChooser("yyyy/MM/dd", "####/##/##", '_');
components[5] = new DemoTable();
addEntry("Default", components[0], gridbag);
addEntry("Default (with addons)", components[1], gridbag);
addEntry("Default with date set", components[2], gridbag);
addEntry("Spinner Editor", components[3], gridbag);
addEntry("Explicite date pattern and mask", components[4], gridbag);
addEntry("Table with date editors", components[5], gridbag);
}