Bug 55463 - Component.requestFocus() is discouraged; use requestFocusInWindow() instead
Summary: Component.requestFocus() is discouraged; use requestFocusInWindow() instead
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
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
Comment 2 The ASF infrastructure team 2022-09-24 20:37:55 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3206