本文整理汇总了Java中com.toedter.calendar.JDateChooser.setDateFormatString方法的典型用法代码示例。如果您正苦于以下问题:Java JDateChooser.setDateFormatString方法的具体用法?Java JDateChooser.setDateFormatString怎么用?Java JDateChooser.setDateFormatString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.toedter.calendar.JDateChooser
的用法示例。
在下文中一共展示了JDateChooser.setDateFormatString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setDateField
import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
private void setDateField(JDateChooser date, JPanel pane, String str) {
CardLayout card = new CardLayout(0, 0);
date.setMinimumSize(new Dimension(120, 20));
date.setDateFormatString("dd/mm/yyyy");
pane.setLayout(card);
card.show(pane, str);
pane.add(date);
}
示例2: buildModelPanel
import com.toedter.calendar.JDateChooser; //导入方法依赖的package包/类
private void buildModelPanel() {
JPanel modelPanel = new JPanel();
modelPanel.setLayout(new SpringLayout());
JLabel urlLabel = new JLabel(resourceManager.getString("label.url"), JLabel.TRAILING);
urlTextField = new JTextField(32);
urlTextField.setEnabled(false);
JLabel crawlDepthLabel = new JLabel(resourceManager.getString("label.crawl.depth"), JLabel.TRAILING);
JSpinner crawlDepthSpinner = new JSpinner();
crawlDepthSpinnerModel = new SpinnerNumberModel(1, 1, 10, 1);
crawlDepthSpinner.setModel(crawlDepthSpinnerModel);
JLabel createdDateLabel = new JLabel(resourceManager.getString("label.created.date"), JLabel.TRAILING);
createdDateTextField = new JTextField(32);
createdDateTextField.setEnabled(false);
JLabel crawlDateLabel = new JLabel(resourceManager.getString("label.crawl.date"), JLabel.TRAILING);
crawlDateTextField = new JTextField(32);
crawlDateTextField.setEnabled(false);
JLabel nextCrawlDateLabel = new JLabel(resourceManager.getString("label.next.crawl.date"), JLabel.TRAILING);
nextCrawlDateChooser = new JDateChooser(new Date());
nextCrawlDateChooser.setDateFormatString("yyyy.MM.dd:HH.mm.ss");
JLabel typeLabel = new JLabel(resourceManager.getString("label.type"), JLabel.TRAILING);
typeComboBox = typeComboBox = new JComboBox(Domain.TYPES);
JLabel indexLabel = new JLabel(resourceManager.getString("label.index"), JLabel.TRAILING);
JLabel searchLabel = new JLabel(resourceManager.getString("label.search"), JLabel.TRAILING);
JTextField searchTextField = new JTextField();
searchTextField.setAction(searchDomainAction);
searchTextField.setToolTipText(resourceManager.getString("tool.tip.search"));
JLabel [] labels = new JLabel [] { urlLabel, crawlDepthLabel, createdDateLabel, crawlDateLabel, nextCrawlDateLabel, typeLabel, indexLabel, searchLabel };
JComponent [] components = new JComponent [] { urlTextField, crawlDepthSpinner, createdDateTextField, crawlDateTextField, nextCrawlDateChooser, typeComboBox, indexComboBox, searchTextField };
SpringLayoutManager.buildForm(modelPanel, labels, components);
add(modelPanel);
}