Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4365538

Use of deprecated Date constructor in JTable

    XMLWordPrintable

Details

    Description

      Name: ks88420 Date: 08/24/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      The Date(String) Constructor is deprecated from JDK1.1.

      However, this constructor is implicitly used by the DefaultCellEditor class to
      create a new Date object from the contents of a JTable or JTree cell, when a
      Date object has been assigned to the cell.

      This is a problem because there are numerous problems with internationalisation
      concerning the Date(String) constructor (for example, the short date is always
      interpreted as US format) - and hence its deprecation.

      Consequently, dates entered as free text in a JTable cell are not interpreted
      correctly in an international setting. For example, "23/12/00" is interpreted
      as 12 November 2001 although in the UK, a dd/MM/yy format is standard.

      Is it necessary to construct a specific DateCellEditor-type object that contains
      multiple DateFormat objects to handle the many different ways users would enter
      dates as free text?
      (Review ID: 108257)
      ======================================================================

      Attachments

        Activity

          People

            serb Sergey Bylokhov
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: