Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 180053 - Centralized method for select-all-on-focus behavior in text fields
Centralized method for select-all-on-focus behavior in text fields
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
PC Windows XP
: P3 (vote)
Assigned To: issues@platform
Depends on:
  Show dependency treegraph
Reported: 2010-01-31 17:12 UTC by _ tboudreau
Modified: 2010-02-01 02:33 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2010-01-31 17:12:48 UTC
Almost all text fields in NetBeans UI contain code which adds a focus listener to text fields and calls selectAll() on focus gained.  But everyone has to write their own code to do it.  I am already doing this with a utility method for all of the Java Card modules.

There are also requests to disable this behavior for unix-style middle-button paste users.  A central location for managing this behavior would make that possible.

I'm proposing adding a method Utilities.configureSelectAllOnFocus(JTextComponent).

Hopefully, if Jackpot is up to it (or if not, with lots of grepping) all or most such instances can be found in a pass over the codebase, and quite likely a number of inner FocusListener classes can be eliminated.
Comment 1 Stanislav Aubrecht 2010-02-01 02:33:51 UTC
sounds like a new feature to me...

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo