Bug 55463 - Component.requestFocus() is discouraged; use requestFocusInWindow() instead
Component.requestFocus() is discouraged; use requestFocusInWindow() instead
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.9
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-08-21 13:52 UTC by Sebb
Modified: 2013-08-21 16:34 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2013-08-21 13:52:55 UTC
According to the Javadoc:
Component.requestFocus() is discouraged because it is platform dependendent; where possible applications should use requestFocusInWindow() instead.

It looks like the main difference is that requestFocusInWindow() does not allow the focussed window to be changed; i.e. the component must already be the focussed window.

It seems likely that this will always be the case for JMeter, so the method invocations should be updated.
Comment 1 Philippe Mouawad 2013-08-21 16:33:53 UTC
Date: Wed Aug 21 16:24:58 2013
New Revision: 1516202

URL: http://svn.apache.org/r1516202
Log:
Bug 55463 - Component.requestFocus() is discouraged; use requestFocusInWindow() instead
Bugzilla Id: 55463

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/FocusRequester.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JDateField.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/modifier/gui/ParamModifierGui.java
    jmeter/trunk/src/reports/org/apache/jmeter/gui/ReportGuiPackage.java
    jmeter/trunk/src/reports/org/apache/jmeter/report/gui/tree/ReportTreeListener.java
    jmeter/trunk/xdocs/changes.xml