[JS] Event handler function is shown as the result in the ESTK

I have a ScriptUI tree, with an onExpand event, like this:
Window1.tvwTree.onExpand  = function (item){
    $.writeln(item.key + " is now expanded.");
Every time the script is run, I get this in the Javascript console of the ExtendScript Toolkit:
Execution finished. Result: onExpand()
First question is: why?
Second question: What's the best and cleanest way to take care of the onExpand event? I didn't manage to assign a function to the onExpand event, in the same way as I do for parameter-less functions.
For simpler events, with no parameters, I do it like this:
Window1.....DropDownList2.onChange = cboNewLanguage_onChange;
... but the onExpand event has its "item" parameter to take care of, and I don't manage to assign the function in a similar way. Please enlighten me.
(Would it be possible to use a prototype approach, for events like this? Getting a common function for all onExpand events...???)
Thanks,
Andreas

Hi Andreas,
First question: what is supposed to be item.key? Have you extended the ListItem properties?
The way you assign the onExpand function seems correct to me. The following code should work:
var myExpandHandler = function(/*ListItem*/ item)
     // this => TreeView
     // item => expanded ListItem
     alert( item.text + ' is now expanded.' );
myTree.onExpand = myExpandHandler;
Alternately, you can create a generic handler through the TreeView prototype:
TreeView.prototype.onExpand = function(/*ListItem*/ item)
     // this => TreeView
     // item => expanded ListItem
     alert( item.text + ' is now expanded.' );
Works for me in CS4 & CS5+.
Note: the onExpand function has no event listener counterpart, so you cannot use the form:  <widget>.addEventListener('expand', myEventListener).
I don't know why your script causes the ESTK console to display "Result: onExpand()". Probably your code contains the corresponding $.writeln somewhere, doesn't it? Also, take into account that if your UI code uses sth like myListItem.expanded = true; then the onExpand handler is called before the win.show(). This may explain unexpected feedback in the console (?)
@+
Marc

Similar Messages

  • I can't remove event handler functions

    Hi guys!
    Please help to remove event handler functions of a
    FLVPlaback. I add some functions for an FLVPlaback instance and
    that's why doesn't work the control panel (play button, pause
    button and so on) Here is a link:
    http://sexaid.fw.hu/vg/vg.html
    to understand simply the problem. thx every ideas!

    I would prefer not to announce the URL to the world on this forum, but I can say the old website still starts with the standard .Mac URL http://web.mac.com/username/iWeb and the new one until I set up to use my own domain was the same I believe.
    Empty the Cache has no effect I can still go to the URL and explore the various pages.
    I do not think that the .Mac websites are hosted from the iDisk location as I have defiantly deleted them from my iDisk and I have rechecked every file in the iDisk for any sign of them also my new iWeb '08 website never appeared in the iDisk. I would presume that the .Mac websites are hosted from a particular location on the Apple servers and I need to some how pull them off separately because publishing another new site with iWeb '08 has just left me with two sites and the old one remains and does not exist in iWeb '08 so I can unpublish it.

  • Passing data to event handler function

    I am trying to pass value to the event handler function but I
    am getting the following error. Can someone please tell me what I
    am doing wrong?
    1067: Implicit coercion of a value of type void to an
    unrelated type function
    here is the code
    private function myClickListener(myid:int):void{
    Alert.show("The button was clicked");
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    b.id=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener(MouseEvent.CLICK,
    myClickListener(o.CATID));
    myvbox.addChild(b);
    ]]>

    "Merlyn MM" <[email protected]> wrote in
    message
    news:[email protected]...
    > Sure, Here is the code. I am very new to flex and if my
    code doesn't make
    > sense
    > then please let me know the correct way to do this. I
    really appreciate
    > you
    > taking time!
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > backgroundColor="#FFFFFF"
    > initialize="myService.getcategories.send()">
    > <mx:WebService id="myService"
    > useProxy="false"
    > wsdl="
    http://devsite/rc/category.cfc?wsdl"
    > showBusyCursor="true">
    > <mx:operation name="getcategories"
    > result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:operation name="getsubcounties"
    result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:request>CATID</mx:request> //need to
    pass category ID here
    > </mx:operation>
    > </mx:WebService>
    >
    > <mx:Script>
    > <![CDATA[
    > import mx.collections.ArrayCollection;
    > import mx.rpc.events.ResultEvent;
    > import mx.rpc.events.FaultEvent;
    > import mx.controls.Alert;
    > import mx.controls.Button;
    >
    > [Bindable]
    > private var catInfo:ArrayCollection;
    >
    > private function myClickListener(myId:String):void{
    >
    > myService.getcounties.send() // I need to send catid
    here to the
    > webservice
    > }
    >
    >
    > public function
    handleStringResult(event:ResultEvent):void{
    > catInfo = event.result as ArrayCollection;
    > for each(var o:Object in catInfo){
    > var b:Button = new Button();
    > b.label = o.FILLCOLOR;
    > b.id='btn'+o.CATID;
    >
    >
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    > b.setStyle("color","#FFFFFF");
    > b.setStyle("fontFamily","Arial");
    > b.setStyle("fontSize",8);
    > b.setStyle("textRollOverColor", "red");
    > b.addEventListener("click", myClickListener);
    > myvbox.addChild(b);
    > }
    > }
    > ]]>
    > </mx:Script>
    I'd change it to this:
    private function myClickListener(e:Event):void{
    //I don't see where you're using the ID, but to get it,
    //use this code:
    var myID = e.currentTarget.data;
    myService.getcounties.send() // I need to send catid here to
    the
    webservice
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    //note that you couldn't have used your ID
    //as a "handle" to anything, so I replaced
    //that logic with something you _could_ use
    b.data=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener("click", myClickListener);
    myvbox.addChild(b);
    You could also use a Repeater and set this up in MXML.
    HTH;
    Amy

  • Why are iMovie events (2400 of them) shown in the iDVD movies pane along with my iMovie projects (12 of them)?

    Why are iMovie events (2400 of them) shown in the iDVD movies pane along with my iMovie projects (12 of them)?

    Sorry about the delay in responding, I've been putting up with a very slow iDVD, but now I'm fed up with it again. My version of iDVD is 7.1.2 (1158) running in Mac OS X, version 10.6.8, with 3.2GHz and i3 processor, 4GB of memory, on a desktop iMac. My version of iMovie'11 is 9.0.4 (1634).
    I can stop iDVD from showing iMovie EVENTS (now 3247 of them) in its Media pane under Movies, by moving the iMovie Events folder from the iMovie folder ( that iDVD ALWAYS looks in) to somewhere else in that Directory (where I store all my data, and which I have named "browning").  But then iMovie can't display the EVENTS, because it is looking in the wrong place. So, how can I save iMovie Events in another folder (not iMovies) but somewhere where iMovie will find them?
    Is there a method to change the default folders for iMovie and/or iDVD? How does iMovie know where the iMovie default directory is?
    Should I put iMovie into the "Main" Mackintosh HD directory?
    The Apple Store in Bath, UK, couldn't help, but surely I'm not the only iDVD user who is annoyed with this process?
    HELP, please

  • Use movie clip event handler function, but not via an event

    Let's say I have the following code:
    var initObj = new Object();
    initObj.mood = "happy";
    mc = attachMovie("mcBox","instBox",100,initObj);
    mc.onPress = boxPress;
    function boxPress() {
    trace("Box mood: " + this.mood);
    Now, let's say there are times that I want to call boxPress()
    other than when the onPress event happens. In other words, I want
    to call boxPress() for a movie clip via my AS code, but not when an
    onPress event has occurred for that movie clip. Is this possible?
    Or is it possible to simulate or force an onPress event for a movie
    clip so that the handler function gets called for that movie clip?

    addEventListener only works with components in ActionScript 2
    "workingonasite" <[email protected]> wrote
    in message
    news:f1vu8r$92i$[email protected]..
    > So I am trying to get my head around event Listeners.
    When I use this
    > example
    > on a button it works fine:
    >
    > but when I add the same listener to a movie Clip on the
    stage with an
    > instance
    > name of "box", it does not work. Is there something
    basic I am missing?
    >
    >
    >
    > var buttonListener:Object = new Object();
    > buttonListener.click = function(eventObj:Object) {
    > trace("click");
    > };
    > mybutton.addEventListener("click", buttonListener);
    >

  • Determine event handler for swing components from the API browser

    Is there a way to determine what event handlers are assocaited with the different swing classes. For example JTextField is associated to ActionListener, and JCheckbox uses the event handle ItemListener. Is there a way to determine this by looking at the class via the Java API?

    Yes, there is. You'll observe that JTextField has an "addActionListener(ActionListener)" method, for a start. And JTextField is a subclass of JTextComponent, which has "addCaretListener(CaretListener)" and "addInputMethodListener(InputMethodListener)" methods. And JTextComponent is a subclass of JComponent, which has an "addAncestorListener(AncestorListener)" method. And so on... there are more. All of this can be found in the API documentation by looking for methods whose names start with "add".

  • UI: Event Handling of forms created with the Screen Painter

    Hi,
    I created a form with the Screen Painter and saved it as XML document. After that, I loaded this form with the following code:
    <i>Dim oXMLdoc As MSXML2.DOMDocument
    oXMLdoc = New MSXML2.DOMDocument
    oXMLdoc.load("C:\form1.xml")
    SBO_Application.LoadBatchActions(oXMLdoc.xml)</i>
    Then the loaded form appears in the SBO application with all added items.
    Now, I would like to know how I could handle an ITEM_PRESSED event for a button of this imported form.
    It would be great if someone could help me with this problem and post some example code.
    Regards,
    Dennis

    Dennis,
    you have to create a function that will handle all the event receive from B1
    <i>    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If (pVal.FormUid = "YourUIDForm") Then
                If ((pVal.itemUID = "YourItemUID") And _
                    (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
                    (pVal.Before_Action = False)) Then
                    ' Here write the coe you need....
                End If
            End If
        End Sub</i>
    Off course, you need your variable SBO_Appliation declared as follow :
    Private WithEvents SBO_Application As SAPbouiCOM.Application

  • Datatip function not shown when the user hovers over the icon int ADG

    When you have a datatip function in a advanced datagrid the datatip  does not show when the user hovers over the icon. Is there a way round this?

    I have almost same situation. But there are some different. I am using RegisterPointerInputTarget to redirect all touch message to my window. and use InjectTouchInput to simulate each flag, which means, WM_POINTERDOWN,WM_POINTERUPDATE,WM_POINTERUP. If user
    touches monitor, I simulate DOWN, if user swipes their finger, I simulate UPDATE, if user lifts finger, I simulate UP.
    Then the interesting point is, system consider user's finger as primary pointer, and my injected touch as secondary pointer. windows desktop and windows explorer skip all my injected touch. I really hate that.
    However IE and chrome will accept my injected touch, they don't caret about primary pointer.
    In order to fix this problem, I call AccNotifyTouchInteraction before calling InjectTouchInput.
    According to the MSDN, AccNotifyTouchInteraction will notify the destination window before InjectTouchInput. But this idea still fails, which is disappointing.

  • Copying text to the clipboard in AVDocDidOpen event handler causes Acrobat 9 to crash

    I'm trying to copy the filename of a document to the clipboard in a plugin with my AVDocDidOpen event handler.  It works for the first file opened; however when a second file is opened, Acrobat crashes.  The description in the application event log is: "Faulting application acrobat.exe, version 9.1.0.163, faulting module gdi32.dll, version 5.1.2600.5698, fault address 0x000074cc."
    I've confirmed that the specific WIN32 function that causes this to happen is SetClipboardData(CF_TEXT, hText);  When that line is commented out and remaining code is left unchanged, Adobe doesn't crash.
    Is there an SDK function that I should be using instead of WIN32's SetClipboardData()?  Alternately, are there other SDK functions that I need to call be before or after I call SetClipboardData()
    Bill Erickson

    Leonard,
    I tried it with both "DURING, HANDLER, END_HANDLER" and "try catch," as shown below.  However, it doesn't crash in the event handler; it crashes later, so the HANDLER/catch block is never hit.
    The string that's passed to SetClipboardData() is good, because I'm able to paste it into the filename text box of the print dialog when I try to create the "connector line" PDF.  I also got rid of all the string manipulation and tried to pass a zero-length string to the clipboard but it still crashes.
    Here's the code:
    ACCB1 void ACCB2 CFkDisposition::myAVDocDidOpenCallback(AVDoc doc, Int32 error, void *clientData)
        PDDoc pdDoc = AVDocGetPDDoc(doc);
        char* pURL = ASFileGetURL(PDDocGetFile(annotDataRec->thePDDoc));
        if (pURL)    {
            if (strstr(pURL, "file://") && strstr(pURL, "Reviewed.pdf")) {
                // Opened from file system so copy filename to clipboard for connector line report
                char myURL[1000];
                strcpy(myURL, pURL);
                ASfree(pURL);    // Do this before we allocate a Windows handle just in case Windows messes with this pointer
                pURL = NULL;
                HGLOBAL hText = GlobalAlloc(GMEM_MOVEABLE, 1000);
                if (hText)    {
                    try
                        // Skip path info and go right to filename
                        char *pText = (char *)GlobalLock(hText);
                        char *pWork = strrchr(myURL,'/');
                        if (pWork)    {
                            strcpy(pText, pWork+1);
                        } else {
                            strcpy(pText, myURL);
                        char *pEnd = pText + strlen(pText);    // Get null terminator address
                        // Replace "%20" in filename with " "
                        pWork = strstr(pText, "%20");
                        while (pWork)    {
                            *pWork = ' ';
                            memmove(pWork+1, pWork+3, (pEnd - (pWork+2)));
                            pWork = strstr(pText, "%20");
                        // Append a new file extension
                        pWork = strstr(pText, ".pdf");
                        *pWork = 0;    // truncate the string before ".pdf"
                        strcat(pWork,".Connectors.pdf");
                        GlobalUnlock(hText);     // Must do this BEFORE SetClipboardData()
                        // Write it to the clipboard
                        OpenClipboard(NULL);
                        EmptyClipboard();
                        SetClipboardData(CF_TEXT, hText);     // Here's the culprit
                        CloseClipboard();
                        GlobalFree(hText);
                    } catch (char * str) {
                        AVAlertNote(str);
            if (pURL)
                ASfree(pURL);

  • OID resource goes to Disabled Status after running the post process event handler

    Hi,
    We have an event handler on post update operation. The event handler using the user manager API to do some modification. We are using the "Lock()" function of User Manager API to lock the user based on attribute value. After running the event handler though the user gets locked as expected, it also disables the OID resource after that. We have other resources along with OID but they are not affected with event handler. Only the OID user is triggering the disable operation on locking the user on event handler. We have used the OID 11g Connector for implementation.
    If you manually lock the user in user interface it's not going to disable status.
    How we can stop to disable the OID User Account.
    Thanks

    No.If you lock the user in Console it's not going disable status.
    Thanks

  • Calling the on(press) event handler

    Preface
    Typically when you set an event handler function for buttons by code, like:
    mybutton.onPress = function(){
             trace("Hello!");
    you can access and call this event handler function by:
    mybutton.onPress();
    and it will execute the function and trace "Hello!".
    Question
    But when you set event handlers on the button itself, like:
    on(press){
             trace("Hello!");
    is that event function accessible from code? how? I know there would be a property that you can access it by, maybe we can "decompile" an SWF to check out finally which property it stores the event code in, or would any of you have any idea?
    mybutton.onPress();   // This does not work!

    I don't know why, but I think it is like this. When you call the onPress() function, it will find a function called onPress, which is the onPress = function(). If you are just curious to know the answer, it is fine. If you really want to solve the problem, make a function ( for example pressed), and use mybutton.pressed(). And at the on(press) code, simply add pressed();

  • Is there a C# example of using the ExpressionEdit Control Custom Button Event Handler

    TestStand 4.1
    C# 2008
    I have added the event handler to the ExpressionEdit events as I would any event handler:
    exprEdit.ButtonClick += new NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEventHandler(_ExpressionEditEvents_ButtonClickEvent);
    Next, I create the Event Handler using the syntax
    public void _ExpressionEditEvents_ButtonClickEvent(NationalInstruments.TestStand.Interop.UI.ExpressionEditButton btn)
    I get the following error when I try to build:
    Error 1 No overload for '_ExpressionEditEvents_ButtonClickEvent' matches delegate 'NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEventHandler' 
    I assume this means that I don't have the correct parameters or types in my Event Handler declaration but it matches the Object Browser.  Any ideas on what I am missing?
    Solved!
    Go to Solution.

    Try removing the "Ax." from your namespace qualifier as I marked below.  I think you want the one in just the UI namespace.
    Edit: well not necessarily.  Is your exprEdit variable declared as "NationalInstruments.TestStand.Interop.UI.Ax.AxExpressionEdit" or as "NationalInstruments.TestStand.Interop.UI.ExpressionEdit"?
    If it is an AxExpressionEdit then I think you will want your event handler to look like this:
    void exprEdit_ButtonClick(object sender, NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEvent e)
     -Jeff
    skribling wrote:
    TestStand 4.1
    C# 2008
    I have added the event handler to the ExpressionEdit events as I would any event handler:
    exprEdit.ButtonClick += new NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEventHandler(_ExpressionEditEvents_ButtonClickEvent);
    Next, I create the Event Handler using the syntax
    public void _ExpressionEditEvents_ButtonClickEvent(NationalInstruments.TestStand.Interop.UI.ExpressionEditButton btn)
    I get the following error when I try to build:
    Error 1 No overload for '_ExpressionEditEvents_ButtonClickEvent' matches delegate 'NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEventHandler' 
    I assume this means that I don't have the correct parameters or types in my Event Handler declaration but it matches the Object Browser.  Any ideas on what I am missing?
    Message Edited by Jeff.A. on 06-11-2010 03:25 PM
    Message Edited by Jeff.A. on 06-11-2010 03:28 PM

  • The reflection answer to event handling?

    I have been playing with reflection answers to the question of how to handle ActionEvent events in Swing... like using a single instance of one member class as a reflection switch:
    private class Listener implements ActionListener {
         public void actionPerformed (ActionEvent action) {
              try {this.getClass().getMethod(action.getActionCommand(), new Class[0]).invoke(this, new Object[0]);}
              catch(Exception exception) {/* error handling code */}
         public void one() {/* do something */}
         public void two() {/* do something */}
    }No more hideous if/then structures and only one inner class. Just match the method names to the action commands and the two line switch handles everything. Much cleaner code and directories.
    I wrote a small example program that you can get the source for here:
    http://www.immortalcoil.org/drake/SmartFrameExample.java
    I can think of only two reasons not to do this right now:
    1) Event / listener mismatches you would have caught at compile time before (if using inner classes) become runtime errors, or if you improve upon the above with Class.getMethods() then dead actions (as with a classic switch).
    2) Inability to look yourself in the mirror or partake of Jesus's love.
    Still, the result is much prettier code and as long as you code it right it will work flawlessly. I am honestly considering using this.
    Thoughts?

    For simple GUIs with very few actions, your approach is obviously overkill. You want to preserve simplicity whenever possible without affecting performance.
    For mildly complex GUIs, I think your approach is good, but still doesn't solve the bigger problem of managing multiple components that use the same action. If you've got so many actions that you need reflection to reduce code, you probably have a GUI with menubars, toolbars, popup menus, and buttons that all perform the same set of actions. Now you have to register an ActionListener with each component, not to mention disabling an action, which involves finding every menu item and button corresponding to this action and disabling/enabling it. I realize this is a different problem than you were trying to solve, but it's worth considering.
    Well, Swing provides javax.swing.Action to handle just this problem, which more or less alleviates the need for your approach because you have an Action subclass for each action. But maybe the best solution for very complex GUIs is a combination of your approach with the Action approach by providing an ActionSet class, which centralizes event handling for all components. The ActionSet class would define for each action:
    1) a static String for the action command
    2) a static String for the tooltip
    3) a static Icon for the icon
    Now, when a new ActionSet is created, it uses reflection to read each of it's fields, creating a new Action subclass for that action and storing it in a HashMap using the action command for the key. The Action subclass just handles the event by forwarding it to a registered ActionListener on the ActionSet class. The ActionListener would implement your approach for reflection event-handling, thereby eliminating if/else/switch clauses.
    The GUI code can call a method "getAction(String actionCommand)" on the ActionSet to retrieve the Action subclass when creating the JMenuBar, JButton, JToolBar, JPopupMenu, etc. Then at any time in the application, you can call ActionSet.getAction(...).setEnabled(...) to enable/disable all components using that action.

  • Event handler if new File added in current folder

    Hi folks,
    I'm just trying to write a little jsx script for Bridge CS6.
    How can I implement an event handler that will react if the user adds a new thumbnail (new file) to the current folder in bridge.
    I've tested it with this code, but it doesn't work:
    app.document.thumbnail.watch ("children", function(id, oldVal, newVal) {
         $.writeln (oldVal + " to " + newVal);
         // some code here
    Thanks. Greetings

    Beautiful. Works as advertised. Thank you for pointing it out to me. Unfortunate that a basic subset of this extension's behaviour doesn't ship with Thunderbird out of the box, though.

  • Event handling - output doubled?!

    hi, i'm trying to implement some event handling through an extension of the MouseAdapter class, but the output comes out twice for some reason. code is as follows:
    note: for some reason an 'i' enclosed in square brackets isn't shown in these forums, but makes things italic... any idea how to change that?!
    public void mouseClicked(MouseEvent e)
    p = e.getPoint() ;
    for(int i = 0 ; i < myproj.length ; i++)
    rect = myproj.getDshape() ;
    System.out.println(rect.toString()) ;
    if (rect.contains(p))
    System.out.println(i) ;
    System.out.println(myproj.length) ;
    System.out.println("clicked one!") ;
    System.out.println(p.toString()) ;
    System.out.println(myproj[i].getDname() + " : " + myproj[i].getStrength() + " : " + myproj[i].getDom()) ;
    wanted++ ;
    System.out.println("Count: " + counter) ;
    counter++ ;
    } // end class MyEventHandler
    however, when i click in one of the 2 rectangles on my applet, the following output is printed:
    java.awt.Rectangle[x=521,y=50,width=25,height=25]
    0
    2
    clicked one!
    java.awt.Point[x=541,y=62]
    tom : 4.51 : 1
    Count: 0
    java.awt.Rectangle[x=571,y=80,width=25,height=25]
    java.awt.Rectangle[x=521,y=50,width=25,height=25]
    0
    2
    clicked one!
    java.awt.Point[x=541,y=62]
    tom : 4.51 : 1
    Count: 1
    java.awt.Rectangle[x=571,y=80,width=25,height=25]
    anyone got any ideas why it does this twice? i have also tried this with mousepressed and mousereleased as well as mouseclicked, but the same occurs...

    You're probably adding the mouseListener to your component twice, but you don't show that part of the code so it's hard to tell for sure.
    'i' enclosed in square brackets isn't shown in these forums, but makes things italicClick on the help link at the top of the page. It explains some formatting codes you can use to make your code easier to read.
    ... - italic
    ... - highlights java keywords and comments

Maybe you are looking for

  • IDOC number is not in the list

    Hi, I am creating an inbound delivery using IDOC. The message type is DESADV and basic type is DELVRY01. After I have populated the control and data tables, I processed them using IDOC_WRITE_AND_START_INBOUND. I have generated the IDOC number after e

  • How to get import com.sun.image.codec.jpeg.*;..Help..

    I’m doing a research for video compression n I need to compress the frame as image, I want to use com.sun.image.codec.jpeg.* , but I can’t download the plugin every where. I use JDK 1.5.0 to do my java program. Does any one have a suggestion about my

  • My pinned tabs are not saved. Changed the settings still does not work?

    This changed before upgrading to the new version of FRFX. I cannot save my pinned tabs, nor does Firefox open to the last tabs open. Tried to change Settings...still does not work. I have a new iMac 3.4, i7, 16g for video editing. Its running LION 10

  • Help required for the query

    sir below query runs fine but the probblem is...i am not able to display the figures in the format '999999.99' Also please guide me as to make the query short... can i use cursors here? i am using 10g select LBRCODE branch, trim(substr(PRDACCTID,1,8)

  • Infotype Header

    Hi, I have created a custom PA infotype and as per the requirement the database table for this infotype would have dates defaulted to 01.01.1800 and 31.12.9999 since the actual data would be stored in OM tables. Now, the infotype header is retrieving