Detecting the source of events ...

I have two buttons A and B. I press the mouse on A and then drag the mouse to B. Now, inside the mouseEntered method of B's MouseListener, I want to be able to detect that the mouse was pressed on A. I dont mind having to extend JButton but, how do I do this???

I haven't seen any code on this, but I wonder if you can extends JButton and have it become an ActionListener. Then have B listen for A. There's probably a better way though.

Similar Messages

  • How to detect the line wrap event of JTextPane?

    Hi all,
    I'd like to detect the line wrapping event of JTextPane, so as to adjust the visible rows of JTextPane. How could I do this? Thanks!
    Yi Bing

    there is no wrap event.
    Wrap happens during relayout. The event which invokes relayout could be different. E.g. change size or chane model (document).
    Just add document listener and componnet listener.
    Regards,
    Stas

  • How to determine the source of Events triggered in a process chain

    Hi ,
      We have almost a 100 process chains, and of these approx 20-30 local process chains are triggered by events raised within other process chains.  These events are raised via BP_EVENT_RAISE using the ABAP process type.
    However, our problem is to identify the source of these event trigger - i.e. which process chain triggered this event ?
    Looking at SM64, the event history does not display the source for these events.
    Is there any table or program that we can use to determine the source of these events which are triggered.
    Any help is much appreciated and points awarded.
    thanks
    BK

    Hi,
    do check in the program /SSA/BWT . or TCODE - ST13 -- enter BW-TOOLS and execute. -- Choose Process chains and execute --- Select the date and time for which you want to see the process chains and execute again.
    This will give you the entire list of process chains triggered, status, timings(start, end, overall runtime). Once clicked on the process chains it will show you the steps in theprocess chains, data loaded in the data targets, source system, etc...
    hope it helps.

  • Detecting the source of a method invocation.

    Within a given method, is there a way to detect what class/method made the invocation call?
    I need to find a way to modify instance variables within a method, based on the invoking class ... I thought of navigating back through the Stack, but I am working with a multi-threaded application so I fear that I cannot absolutely depend on the last Stack call being the actual invoking class/method. Any ideas? - please help.
    Many thanks,
    Thomas

    How does one access the method invocation stack?I'm not sure if an easier way exists, but you can extend SecurityManager to fetch the Class context of the current Thread, which will provide you with an array of Class obejcts, ordered according to the method invocation stack. Thus, you can determine what Class invoked a particular method, but you can not determine what Object (not via the SecurityManager funcationality).
    Here is a simple class I often use for such a need (excuse any formating issues- or misspellings in the documenation)... ... although, it should be stated, this class may not work in certain environments- specifically ones that deny permission "createSecurityManager".
    * This class provides static utility methods for retrieving information
    * on the class context.  The methods in this class can provide a
    * resource with a list of the classes that invoked it, thus allowing
    * clases to determine if a particular method is being accessed by
    * the proper caller or allow Class variables to be initialized statically,
    * with out having to instantiate the type.
    * <p>This class is meant to provide simple functionality in familiar
    * environments.  Its funcationality may not work properly when executing
    * in an enviroment with strigent security permissions.  Specifically, if
    * permission is denied to construct a new SecurityManager instance, the
    * methods of this class will fail.
    * @author: Sean Flanerry
    public final class ClassLookup extends SecurityManager {
      private static final ClassLookup instance = new ClassLookup();
      private ClassLookup() { }
      * This method returns the class context for the current thread in format
      * <ul>
      * <li>Class for currently executing method
      * <li>Class that invoked the above method
      * <li>Class that invoked the above method...
      * </ul>
      * The first two elements in the returned array will be of type ClassLookup.
      * @see java.lang.SecurityManager#getClassContext()
      public static Class [] fetchClassContext() {
        return instance.getClassContext();
      * This method returns the Class that invoked this method.  This method
      * is used primarily by static initializers that have to retrieve a handle
      * to the java.lang.Class instance that wraps the current type, but that
      * can not instantiate the current type, eg <br>
      * <code>public static final Class currentClass = ClassLookup.getCallingClass();
      public static Class getCallingClass() {
        return instance.getClassContext()[3];
      * This returns the Class that invoked the current method on the calling
      * Class.  If for example, Race.startRace() invokes Runner.sprint(), Runner.sprint()
      * can determine what class invoked it by calling this method.  In other
      * words, this method lets other methods determine which class invoked
      * it.
      * <p>Remember that this method returns a Class instance for which
      * ever type contains the method which invoked the caller so the
      * Object returned by this method might be the caller's type if the
      * caller was spawned by a method with in the same class.  Consider,
      * <ul>
      * <li>Race.start() invokes
      * <li>Runner.sprint() which invokes
      * <li>Runner.fatigue()
      * </ul>
      * If Runner.fatigue() invokes this method, an instance of Runner.class will
      * be returned, <b>not</b> Race.class because fatigue was invoked by sprint.
      * <p>This method is typically used by resources that wish to determine
      * if the current method is being invoked via the proper context, ie the
      * invoking class is a trused resource.
      public static Class getInvokingClass() {
        return instance.getClassContext()[4];
      public static void main(String args[]) {
        Class [] c = fetchClassContext();
        for (int i = 0; i < c.length; i++) {
          System.out.println(c.getName());

  • How to get the source of event?

    Hi All,
    I have more than 1 hideShowHeaders, and I need to know where the "show" event came from.
    I just saw that they have something for LOV Events, I hope they have for the other web beans.
    Anyone knows how? Please help. Thanks!

    HI,
    u can make use of
    pageContext.getParameter(OAWebBeanConstants.SOURCE_PARAM)
    to get the id of hide/show header.
    Thanks

  • How to effectively detect the session expiration in the portlet (JSP pages)

    Hi,
    In a web application using weblogic personalization server, I want to
    monitor how many users are currently logged on the system.
    It can be detected when a user logs on(by clicking sign on button), and logs
    off (by clicking the sign off button).
    I want to know how to detect the sign off event when the session
    automatically expires (in this case, the user does not click the sign-off
    button).
    Thanks!
    Jeff

    TRIPLE post http://forum.java.sun.com/thread.jsp?forum=45&thread=532724&tstart=0&trange=15

  • Find Source of event triggering

    Hi all,
    I have a doubt in Workflow.
    A Workflow can be triggered by an event of the Business Object. But this can be done through
    1) Create Event SWUE
    2) Simulate Event SWU0
    3) Actual action in Tcode which triggers the event
    4) Custom program where we use Function Module to trigger event
    5) Directly executing function module SWE_Event_Create
    6) SWUS u2013 Execute Workflow
    7) SWIA u2013 Execute Workflow without Agent
    But if event linkage (SWETYPV) is active and once the Workflow is triggered (as seen in SWI1) u2013 how can we find out by what way (of the above mentioned options) the event has been triggered? i.e. how to find out the source of event triggering?
    Regards
    Vasu

    Hi,
    I am not sure if you can find the information. I suppose you have investigated the workflow container carefully?
    Then you could check all the WF database tables that are updated when the work item is created. For example check SWWWIHEAD table if there is some information about the creator (which program created it). If you can find the information, then you can easily enhance your workflow / business object / whatever to get the information.
    Then you could also check if you can get the information with the check function module (that is defined in SWETYPV). Put a breakpoint there, and see if the sy-<field> system variables include some information about the triggering program (perhaps sy-repid?). If you can find some suitable variable, then you could perhaps develop something based on the check function module.
    Regards,
    Karri

  • The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    Hi,
    Can any one help me on the below issue ?
    while executing automated test case in test center it is showing as test case is in progress, then i navigated to virtual machine (where the test agent is online), there Internet
    explore has opened automatically and my test case execution started, but with in a seconds IE has closed . However, in test center, test case status is showing as in
    progress, after  2 or 3 min  some of  test cases getting passed and some are failed.
    Here my question is in lab center-->virtual machine, IE has opened automatically and navigated the 2 or 3  links and with in seconds IE has getting closed. Why IE is getting closed without completing execution?
    Error Message :
    The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the
    installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    (mtm.exe, PID 5240, Thread 4) FileAggregatorSessionInfo: Error occurred while deleting temporary directoryException: System.IO.DirectoryNotFoundException: Could not find a part of the path 
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
       at Microsoft.VisualStudio.TestTools.Execution.Aggregation.FileAggregator.FileAggregatorSessionInfo.DeleteTemporaryDirectory(String temporaryDirectory)
    the message resource is present but the message is not found in the string/message table
    Thanks
    Suresh
    Suresh

    Hi,
    Can any one help me on the below issue ?
    while executing automated test case in test center it is showing as test case is in progress, then i navigated to virtual machine (where the test agent is online), there Internet
    explore has opened automatically and my test case execution started, but with in a seconds IE has closed . However, in test center, test case status is showing as in
    progress, after  2 or 3 min  some of  test cases getting passed and some are failed.
    Here my question is in lab center-->virtual machine, IE has opened automatically and navigated the 2 or 3  links and with in seconds IE has getting closed. Why IE is getting closed without completing execution?
    Error Message :
    The description for Event ID 0
    from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    (mtm.exe, PID 5240, Thread 4) FileAggregatorSessionInfo: Error occurred while deleting temporary directoryException: System.IO.DirectoryNotFoundException:
    Could not find a part of the path 
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
       at Microsoft.VisualStudio.TestTools.Execution.Aggregation.FileAggregator.FileAggregatorSessionInfo.DeleteTemporaryDirectory(String
    temporaryDirectory)
    the message resource is present but the message is not found in the string/message table
    We are using VS 2013 (premium) and IE 10.0,  scripts have been created on the same versions. It is working fine  on
    developers command prompt but the same tests are getting failed in lab center test agent machine
    test agent log:
    QTAgentService.exe, AgentService: calling AgentObject.RunEndFileCopyComplete
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: waiting for agents to start.
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: Agents started.
    QTAgentService.exe, AgentProcessManager.PerformActionIgnoringExceptions: Successfully called 'Cleanup' on the test agent
    QTAgentService.exe, AgentProcessManager.PerformActionIgnoringExceptions: Calling 'StopDataCollection(int)' on the data collection agent
    QTAgentService.exe, AgentProcessManager.IsDataCollectionAgentNeeded: IsExecutedOutOfProc? True
    QTAgentService.exe, AgentPro
    QTAgentService.exe, AgentProcessManager.WaitForDataCollectionAgentProcessToStart: Agents started.
    QTAgentService.exe, AgentService: Connection to controller is up.
    Thanks
    Suresh

  • Is there a way to detect the event when device goes to sleep and the screen blackens?

    I want to detect the event when the iOS device goes to sleep and the screen blackens?
    Is there any way to do it?

    Hi,
    A small idea, please check whether it will work or not.
    You can achieve this by using combination of DNS server and reverse proxy server.( Customized apache). Make 'A' record for www.abcd.com to reverse proxy server IP address in your DNS.
    So it will resolve your reverse proxy IP address for requests.
    Configure appche to accept incoming request for www.abcd.com and points towards www.abcd.com/parameters.
    I think this will solve your problem.  Only one condition is that proxy server will communicate with www.abcd.com on behalf of client.
    Follow the link for configuration of reverse proxy server
    http://www.slashroot.in/how-configure-basic-apache-reverse-proxy
    HTH
    Naisam

  • How to find out the source of an event fired by button in a table in WD?

    Hi experts,
    I'm new to Web Dynpro and I need to know how to find out the source of an event (IWDCustomEvent) fired by a button in a table? I need to know which one is the clicked button (on which row)?
    Help will be appreciated
    Regards

    Hi GLM,
    thanks for your reply. Yes I know about that but when a round trip to the server is made the lead selection is at the first row of the table and when i click the button on, for example, the 3rd row the getLeadSelection method returns 1 and the color marker for the current row stays on the first row. So I need to click first somewhere else on the 3rd row and then on the button in order to update the value of lead selection and it's not very nice. So if you have some other idea it would be very helpful. Or perhaps some workaround.
    Regards

  • How to find out the source of an event trigger

    Hello Experts,
    An event is starting a total of 5 jobs daily, I would like to find out how that event is triggered
    I checked in ST13 for all the jobs that were running / finished just before those 5 jobs started but no luck - None of the job is matching for all the days
    Checked in SM62 for event history, however it wont show the source of that event
    Checked tables "BTCEVT*" - They doesn't even show how that event is called
    Could you please assist?
    Thanks,
    Subbu

    Hi Subbu,
    You can try to trace the event using below transaction codes..
    SWEL - Display Event Trace
    SWELS - Switch Event Trace On/Off
    SWE4 - Status Change Event Trace
    RSWELOGD - Delete Event Trace
    SWEM - Configure Event Trace
    Regards,
    Prithviraj

  • Using javascript to detect the onclick event over a datatable row

    Hi all,
    I'm working with JSF 1.2 R.I. and I would like to add some javascript to my datatable to be able to control the onclick event on a row.
    At the moment I have just added a checkbox to be able to know which row the user wants to select but I'm not satisfied with this solution.
    <h:dataTable
    value="#{person_iupopulations_Observation.customer}" var="customer"
    rowClasses="evenRow,oddRow"
    cellspacing="0">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Select" />
    </f:facet>
    <h:selectBooleanCheckbox value="" onclick="getRow(this)">
    </h:selectBooleanCheckbox>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name" />
    </f:facet>
    <h:outputText value="#{customer.Name}"></h:outputText>
    </h:column>
    </h:dataTable>
    What I would like to achieve is:
    When the user clicks the row (wherever, not only the checkbox) the checkbox changes to the new value depending, off course, on the user's selection.
    For this purpose I would need to add the onclick event to every row and associate it to a javascript function to update the checkbox.
    Can anybody help me please.
    I appreciate any suggestion.
    Thanks in advance!

    I am looking for answers on how to use javascript to detect the onclick event over a datatable row . I have a selectBooleanCheckBox in one of the columns in the every row in the table. On click of the checkbox in any row of the table, I want to get some values from the selected row and also verify that the rest of the checkboxes in all the other columns are unchecked. I want to do this using javascript. If any of you have answers, please repsond. Thanks.

  • How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?

    How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?
    I have a HTML extension running in In-design CC 2014 version.
    I want to perform some required set of actions before my extension window is closed(by clicking on the cross button on top right corner).
    Does In-design throws any event for it? Or can we capture it using C++ plugin in some way?

    Naah.......haven't got any event for that yet.
    Although, since HTML extensions are using chromium browser,  as a workaround, u can attach listener to HTML onClose event, but it won't solve any purpose if you
    are looking to logout session or do some business login in your code.

  • Is there a way to alphabetize events as they appear under 'Photos' in the source list?

    When I click 'Photos' under the source list, I can see all of the events as I labeled them. Is there a way to alphabetize them by name? It looks like that are in order by the date they were created. I've tried everything and can't figure it out, so any help would be appreciated.

    Hi Larry,
    thanks for the quick reply. I was able to alphabetize them in event view. I guess there's no way to alphabetize them in photos view?

  • The description for Event ID 8306 from source Microsoft-SharePoint Products-SharePoint Foundation cannot be found

    hi,
    can anyone please help me with the following:
    The description for Event ID 8306 from source Microsoft-SharePoint Products-SharePoint Foundation cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair
    the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    The HTTP service located at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas is too busy.
    The publisher has been disabled and its resource is not avaiable. This usually occurs when the publisher is in the process of being uninstalled or upgraded
    _________________________________________________________ Fahad Khan

    Hi,
    Please try the following steps to troubleshoot your issue:
    1.      
    You can try to re-run SharePoint 2010 products configuration wizard to see any problems that still exist.
    2.      
    Go to IIS and see the status of SecurityTokenServiceApplicationPool service, whether it is stopped or not, restart the pool.
    3.      
    Go to manage web application services, review the status of Security Token Service application , try to restart.
    4.      
    In Central Administration>Security>Configure Service Account>Change the service account for the Security Token Service application to some other managed account.
    5.      
    If the issue persists, try the resolution in this blog:
    http://blogs.msdn.com/b/sowmyancs/archive/2010/07/16/sharepoint-2010-service-applications-bcs-metadata-access-service-are-not-working.aspx
    Let me know the result.
    Xue-Mei Chang

Maybe you are looking for

  • How to edit existing pdf's from RoboHelp 8

    Hi, Our company had been using an old version of RH5 for many years, and we've recently upgraded to RH8 to manage our company Infocenter (knowledge repository). We have many pdf files within this repository. Before upgrading to RH8, we would edit pdf

  • Where clause - parentheses versus view link

    I have detail View Object DetailVO with where clause "status=1 or status=2" and I add it to AM as detail of masterVO. Then the link doesn't work, I suppose BC4J create new where clause as "status=1 or status=2 and :1=....". But it means "status=1 or

  • Time "and" Date Comparison

    Hi, I am trying to get the difference between two sets of time. This also involves a Date comparison because sometimes the times span more than one day. Here is an example of what I'm trying to accomplish. I have searched the forum archives but have

  • Career and Job workset in ESS

    Hi Guys, I have a problem in ESS role, I am having SP12 portal with ESS SP8,ADS SP10 and WebDynpro 6.4. In Ess role there is a workset called "career and job" when I try to open "Candidate Profile" under this workset I get an error regarding com.sap.

  • How to install sockets for php

    I am running torrentflux and am trying to run fluxd and some other stuff that requires "sockets". Here is what torrentflux says: Server OS: Linux PHP-Version: 5.2.6 sessions: yes pcre: yes sockets: no safe_mode: off allow_url_fopen: on register_globa