Java™ Platform
Standard Ed. 8
javax.swing

Class JSpinner.DateEditor

    • Constructor Detail

      • DateEditor

        public DateEditor(JSpinner spinner)
        Construct a JSpinner editor that supports displaying and editing the value of a SpinnerDateModel with a JFormattedTextField. This DateEditor becomes both a ChangeListener on the spinners model and a PropertyChangeListener on the new JFormattedTextField.
        Parameters:
        spinner - the spinner whose model this editor will monitor
        Throws:
        IllegalArgumentException - if the spinners model is not an instance of SpinnerDateModel
        See Also:
        getModel(), getFormat(), SpinnerDateModel
      • DateEditor

        public DateEditor(JSpinner spinner,
                          String dateFormatPattern)
        Construct a JSpinner editor that supports displaying and editing the value of a SpinnerDateModel with a JFormattedTextField. This DateEditor becomes both a ChangeListener on the spinner and a PropertyChangeListener on the new JFormattedTextField.
        Parameters:
        spinner - the spinner whose model this editor will monitor
        dateFormatPattern - the initial pattern for the SimpleDateFormat object that's used to display and parse the value of the text field.
        Throws:
        IllegalArgumentException - if the spinners model is not an instance of SpinnerDateModel
        See Also:
        getModel(), getFormat(), SpinnerDateModel, SimpleDateFormat
Java™ Platform
Standard Ed. 8

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部