本文整理匯總了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);
}