JDK-4097100 : Swing 0.6.1 - JTextField should allow to limit number of input chars
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.4
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1997-12-04
  • Updated: 2000-07-21
  • Resolved: 2000-07-21
Related Reports
Duplicate :  
Description

Name: dgC58589			Date: 12/04/97


JTextField does allow to set a limit to the number of characters that can
be entered (and set from outside). This drawback has been inherited from 
the TextField.

It does not allow, however, to set max number of chars allowed to be entered 
and disable scroll after number of entered chars reached. This is particularly 
useful when interfacing legacy systems where text fields have length 
limitations in most cases.


(Review ID: 21329)
======================================================================

Comments
WORK AROUND Name: dgC58589 Date: 12/04/97 ###@###.### 12/04/97 Subclass the com.sun.swing.text.PlainDocument to limit the number of characters that can be entered and subclass the JTextField to return a new instance of that subclass in the createDefaultModel(). ======================================================================
11-06-2004

EVALUATION This would likely be a feature of an enhanced text field planned for merlin. timothy.prinzing@eng 2000-03-22 This feature is being tracked through, 4290529, which I am closely this out as a dup of. scott.violet@eng 2000-07-21
22-03-2000