How to stop a listener?

hello, i'm working on a small school project, i'm experimenting a little with listeners
and I wanted to know if it was possible to exit a listener?
as soon as i start draging, i want to execute the commando "jPanel1.add(com)" and right after that i want to leave the listener so possible other listeners/actions can be executed. (while i'm still dragging...)
        public class componentMouseMotionListener implements MouseMotionListener
                Component com;
          public componentMouseMotionListener (Component component)
               com=component;     
               public void mouseDragged(MouseEvent e)
               {jPanel1.add(com);}
               public void mouseMoved(MouseEvent e)
        }

hello, i'm working on a small school project, i'm
experimenting a little with listeners
and I wanted to know if it was possible to exit a
listener?
as soon as i start draging, i want to execute the
commando "jPanel1.add(com)" and right after that i
want to leave the listener so possible other
listeners/actions can be executed. (while i'm still
dragging...)
public class componentMouseMotionListener
ener implements MouseMotionListener
Component com;
public componentMouseMotionListener (Component
nt component)
               com=component;     
Perhaps--in some situation, you want to temporarily disable activity based on some condition, maybe something like this? Where you are basically setting a flag for whether at this specific point you are wanting to respond to the event or not...
    boolean ignore=false;
     public void setIgnore(boolean b)
     {ignore=b;}
               public void mouseDragged(MouseEvent e)
                        if (!ignore)
                        jPanel1.add(com);
                        if (somecondition) {setIgnore(true);}
               public void mouseMoved(MouseEvent e)

Similar Messages

  • How to stop/start listener

    Hi Everyone,
    I am new in Oracle!
    I have oracle 11g installed on my windows system. I am trying to start/stop listener from em web console but it is not working.
    The system is asking for username and password, I am typing my own (which is DBA) or even SYS .... and it still unsuccessful...it is saying :
    Error: Invalid username and/or password
    Please, help!
    How can I do that from em console
    P.S. Before I was using 10g version and it was OK, I was able to start/stop listener from em web console using SYS or my username.
    Thanks

    If you want to perform OS related tasks from the enterprise manager, such as starting/stopping services or performing backup/recover, export/import, sqlldr, etc. you are required to provide an OS username and password, this password should be stored at the preferred credentials, and this user must have the 'log on as a batch job' , otherwise Enterprise Manager will keep on asking for a username/password.
    This is also a symptom of a missconfigured Enterprise manager, but before diagnosing this situation, verify at the preferred credentials section that your user's credentials are properly tested, validated and stored, if this is the case, then look for the logs found at the ORACLE_HOME\hostname_sid\log directory and find out if another error message is displayed there.
    ~ Madrid

  • How to stop B2B listener polling when SOA server in Admin Mode

    Hi ,
    I recently came across this situation like my B2B FTP listener is polling and deleting file when my SOA server is Admin Mode.
    Can anyone help me to stop that polling when server is in Admin Mode ?
    Thanks,
    Saba

    thanks for quick reply...
    the "catch (IOException e) {... } " block in Server already catches this exception, and as there is no other code but printing the exception, the method run() is quitted (no need to terminate the loop). However, the thread is NOT terminated even after that. To make it sure, I added a public variable and accessed it from Handler at the end of the code, after sd.resetSock(); !!!
    You told that it doesn't stop because of the way I coded it, isn't it the traditional way of setting a listener socket? If no, may be recoding the listener would be much better...

  • How to stop and start MDBs to listen for JMS messages

    Hello! This might be more of an architecture question rather than a technical questing, but I post it here, in the lack of a better place...
    For several years I have been using Webster and Webster MQ to send messages back and forth to clients. The architecture for the middleware platform has been designed around the functionality of ListenerPorts. Listenerports is a Webster functionality that let you "stop" and start to listen to JMS messages for a given MDB either by admin console, or by JMX.
    The arhitecture we used was something like this :
    1.Client sends a persistent message to a queue. (order)
    2. An MDB pics up the order message, calls a SessionBean that "fronts" the IIOP back end system.
    This is quite "out of the box" architecture, but we used the Listenerports to solve a stability problem for our back end system.
    The backEnd system was quite unstable, so the EJB threw an exception (typically because of timeout or connection refused) back to the MDB.
    The Listenerport was "defined" to handle 3 errors before stopping, so the MDB resent the message twice before the listenerport automatically stopped. The nice thing about this feature was that the client could continue to send orders, and was not bothered when the back end system was down.
    When the backEnd system was up and running, we could start the listenerport and it was all back to normal state. We even had a start script that checked the state of the listenerport every 30 minute, and started it automatically if it was stopped, making the admin task of starting the MDB unnecessary..
    Now.. Why am I telling this story..
    I would like to know how this could be done using "clean" J2EE technologies..That is..Not using any technology that is not portable..
    I`m playing with glassfish at home, and it struck me that there is nothing in the J2EE spec that defines the functionality described above ? Am i missing something ?
    I Do not want to stop My application because the back end system is down? That is the only way (i know of) that i can "stop" to listen for messages..
    I can put all the messages on an error queue when the backbend system is down, but that would lead to more code just to handle the error messages. Maybe the easiest way to solve this is to "move" (programmatically) all messages from the error queue over to the "standard" queue every XX minute, but somehow that sounds "wrong"
    Can anyone give me some advice to how this problem situation should be solved ? I`m interested in the solution both from an architectural perspective and from a more technical perspective..
    Best regards
    Hans-Jacob Melby

    Breakpoints, whether normal or conditional, are just meant for debugging of your code.  I had the sense from your question that the pausing you want to do is a part of normal operation of your code.  I would NOT recommend using a breakpoint for that situation.  It would bring up the block diagram showing the breakpoint when it occurs.  A user besides the programmer would not know what to do in that case.
     Yes, both the inner and outer loops would have shift registers.
    Putting a case structure with a small while loop inside the "Pausing Case" is doable.  It just depends on what you are doing or waiting for while the program operation is "paused".

  • HT4061 Every time I use my I pad it keeps popping up with enter my iTunes password. I have nothing waiting to download and not trying to purchase anything yet every time I want to listen to music or use my apps this happens. Can anyone tell me how to stop

    Every time I use my I pad it keeps popping up with enter my iTunes password. I have nothing waiting to download and not trying to purchase anything yet every time I want to listen to music or use my apps this happens. Can anyone tell me how to stop this?

    If you get an error that says can't backup, try moving the existing backup file to a safe location and thry again. again. You can find the location of the backup file here:
    iPhone and iPod touch: About backups

  • How to stop //ANDROID:${from} has sent you a Sprint Voice Message. Call ${callbackno} to listen.?

    I keep getting this text message on my ipone4s every hour.
    //ANDROID:${from} has sent you a Sprint Voice Message. Call ${callbackno} to listen. CFGs1840.0=0fb15457cd82d2573628IAkhiRv//CM
    Does anyone know how to stop this. Sprint has no idea and it's really annoying.

    They have an auto-SMS sending program running that has your phone number in the list. Talk to your carrier about it. - ÇÇÇ

  • How to stop listening on advanced queue

    hi,
    i created a java application that listens to an oracle advanced queue then automatically dequeues a messsage after listening. I've set my listen time-out to be the maximum integer value because i don't know when exactly when other applications will enqueue messages.
    the problem is when i attempt to shutdown the server, my application is still listening to the advanced queue.
    i want to find a way to for the LISTEN to stop whenever i perform a certain event, for example, i want shutdown my server. does oracle advance queue have that kind of functionality? stopping the LISTEN?
    Thanks very much
    Chesca

    Hi Chesca,
    we recently experienced the same problem.
    Instead of "resolve" it, we tried to "avoid" it.
    Our solution is based on 2 legs:
    1) a "not-infinite" wait time, let's say 300 secs (5 mins)
    2) an (outer) "infinite-loop" that relaunch the (inner) LISTEN method, catching the appropriate exceptions, and testing for the "state" of the queue
    Hope this could help you.
    Bye
    Paolo

  • How to stop Time Machine from backing up Temp Files?

    Hi folks!
    I am trying to find out how to stop Time Machine from constantly backing up 'useless' temporary files accumulated from web browsing? Although I don't change or add large files to my HD, Time Machine backs up hundreds of MBs every hour. Those file amounts make sense when I consider that I browse a lot to YouTube, SoundCloud, etc to watch videos or listen to music - I just don't want them to be backed up.
    Under Time Machine Options I already excluded the following items from backups:
    ~/Library/Caches
    /Library/Caches
    ~/Downloads
    But even though I did this weeks ago, Time Machine stills finds large files to be backed up every hour and my only guess is that I am still missing a location where either Safari or Firefox - the two web browsers I use - store temporary files.
    Can you help?
    Thanks a lot in advance!

    oas2103 wrote:
    they come from my anti-virus software
    Are you sure you need that? There are no viruses that run on OSX. None. Zip. Zero.
    If you're running Windoze on your Mac, that's the same as running it on a PC, so it needs all the same anti-everything stuff you'd use on a PC.
    There is some "malware," such as Trojans, for Macs, though. But (unlike viruses that can get onto your system without your knowledge), you must approve their installation (via your Admin password) and/or operation (via the "This application was downloaded from the internet ..." prompt).
    Appropriately enough, some of these Trojans are included in pirated versions of Apple software, such as iWork!
    For the gory details, see Thomas Reed's [Mac Virus Guide|http://www.reedcorner.net/thomas/guides/macvirus].
    Thanks a lot again!
    You're quite welcome, and thanks for posting back.

  • How to stop and start only the process of Oracle Application Express?

    I'd like to know how to stop the process of Oracle Application Express on my server installed oracle express package.
    After installed Oracle Express edition, not only oracle database server processes but also Oracle Application Express, such as http server, is started automatically...
    I hope to stop and start Application Express on demand but is this feature enabled?

    Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
    When an Apex session starts it starts calling the API.
    You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
    The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
    Regards,

  • How to stop and Start ASM in 11gR2

    Hi,
    Any one please let me know the complete process of how to stop and start the ASM instance in
    11.2.0.1 oracle.
    Thanks.
    Ali

    Hi;
    If you need to close ASM than you need to also close database
    You need to close db:
    srvctl stop database -d instance_name
    or
    set ORACLE_HOME and ORACLE_SID
    sqlplus "/as sysdba"
    shutdown immediate;
    srvctl stop LISTENER
    srvctl stop ASM -f
    or see:
    Stop asm instance in standalone database
    Re: Stop asm instance in standalone database
    Regard
    Helios

  • How to STOP and START the BO EXPLORER/POLESTAR - LINUX

    Dear friends,
    Could you please let me know on How to STOP and START the BO EXPLORER/POLESTAR on LINUX platform?
    Thank you,
    Nikee

    Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
    When an Apex session starts it starts calling the API.
    You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
    The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
    Regards,

  • Video file how to stop and find Video is completed.

    hi
    we have load the .flv file the following code:
    //===================================
    var vid:Video = new Video(310, 174);
    vid.y=24;
    vid.x=308;
    addChild(vid);
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    vid.attachNetStream(ns);
    var listener:Object = new Object();
    listener.onMetaData = function(evt:Object):void {};
    ns.client = listener;
    ns.play("Best Ford Commercial Ever!!!.flv");
    //===================================
    video play fine. i using close btn close the Video. the folloing code:
    //===================================
    removeChild(vid)
    //===================================
    problem:   1.  Video will be closed but audio is running. How to stop the audio and video.
    2. How to trace the video is completed.
    thks

    Use NetStatusEvent.NET_STATUS event listener for netstream and trace(event.info.code);
    if info.code is NetStream.Play.Stop the video is finished playing.
    use NetStream.close() method to Stops playing all data on the stream

  • How to stop Flash Screen?

    Hello!!
    I have a JSP page which has iFrame.
    <iframe src="test.jsp" name="printframe" width="0%" height="0%" onLoad="abc();" > </iframe>I am generating PDF content in the iFrame and I am able to do that successfully.
    But the problem is, whenever I generate PDF content in page, Flash Screen of Adobe Acrobat Reader appears.
    How to stop that Flash Screen?
    Reg,
    Chetan Parekh

    <%
    response.setSarcasm(true);
    %>
    You write a nice letter to Adobe and you say:
    "Please, would you remove your splash screen so that when I load my PDF file, the user doesn't know it's really using your software. I realize that you provide this PDF reader software free of charge to anyone who wants it, and that I have no right to ask you to hide your identity from the users of said software, but please please please please please?!?"
    I'm sure they'll listen and release a new version just for you.
    <%
    response.setSarcasm(false);
    %>
    In other words, you can't, and you shouldn't be able to so just forget about it. It only shows the first time a PDF file is loaded in the browser session anyway.

  • How to stop the animation at a certain frame using action script 3.0 .

    How to stop on a frame to stop the animtion using adobe flash cc.

    Either put a stop(); command in the desired frame of the animation's timeline, or have an ENTER_FRAME event listener working who's event handler function constantly check the currentFrame value of the animation and issues an animation.stop(); command when the desired frame is reached

  • Every time i get on my computer and click on imessage and facetime a little box pops  up saying an internal messages error occurred  or an internal facetime error occurred....but my question is how do i get it to stop doing this or how to stop it

    every time i get on my computer and click on imessage and facetime a little box pops  up saying an internal messages error occurred  or an internal facetime error occurred....but my question is how do i get it to stop doing this or how to stop it.

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

Maybe you are looking for