How can I get the events from a java program?

I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
Thanks

Hi,
To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
Say
myFrame which is the JFrame object which shuld be monitored for the events.
Then in ur program u have to add following code
myFrame.addMouseListener( someObectReference );
Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
public class MyMouseListener implements MouseListener {
// override the followig methods
public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
public void mousePressed(MouseEvent me){}
public void mouseReleased(MouseEvent me){}
If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
and u should say myFrame.addMouseListenet( this );
thats it

Similar Messages

  • How can i get thes songs from ipod nano to the itunes libary??

    hi
    i have ipod nano and i sync it with over 500 songs .....my bad i lose all that songs on my libary  .... how can i get thes songs from ipod nano to the itunes libary??

    See this older post from another forum member Zevoneer on different ways to copy content from your iPod to your computer.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • HT4437 I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?

    I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?
    This one is used in Windows laptop, and I want it support AirPlay service, but Apple doesn't publish the AirPlay protocol.
    Many thanks.

    Create a developer account, then access he developers forums and see if you can find the information that way 
    The other option would be to simply contact Apple directly.

  • My wife has an I Tunes account on our PC, I have an I tune account on my Mac Book Pro.   How can I get the music from her account on the PC to my account on the Mac Book and I phone?

    My wife has an I Tunes account on our PC, I have an I tune account on my Mac Book Pro.   How can I get the music from her account on the PC to my account on the Mac Book and I phone?

    IflyDavie wrote:
    I need help to delete my icloud account from my iPad.  It has "Find my iPad" on it and won't let me delete without the old password.  I don't want to reset password as it will require reset of Mac Book Pro and 2 iphones.  Help appreciated.
    Your description of the problem is a bit confusing.  Do you have ONLY ONE Apple ID or do you have MORE THAN ONE?

  • Can anyone let me know how can i get the ouput from BW in .txt format.

    Can anyone let me know how can i get the ouput from BW in .txt format. See we can get output as Excel(i.e BEX) and manually convert it into txt format. I need a direct or automated way to do the same.no human intervention.
    mail me at [email protected] or post answer in sdn.

    Please do not multiple post across forums..
    how can i save the data in BEX reports in .txt format automatically
    This helps in keeping track of answers and avoids the issue of repeated answers across forums...
    Please close one of the threads as answered and provide the link that you want to follow
    Arun

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

  • My computer crashed and I no longer have the itunes library. i get an error msg that my iphone is synced to another library - how can I get the info from the phone to the itunes library?

    my computer crashed and I no longer have the itunes library. i get an error msg that my iphone 3g is synced to another library - how can I get the info from the phone to the itunes library without losing everything? How do I delete old audiobooks from my iphone?

    You can transfer itunes purchases:  File>Devices>Transfer Purchases
    The iphone is not a storage/backup device.  The sync is one way - computer to iphone.  The exception is itunes purchases.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.

  • How can I get the photos from iPhoto copied to a disk in the order I want?

    How can I get the photos from iPhoto copied to a disk in the order I want??

    To ensure a custom ordering, sort the files in an album and rename the files with a sequentially numbered filename.
    File > Export > Version/Originals
    Then use "Filename > Sequential"
    or "Filename > Album name with index"

  • How can I get the music from garageband on my Ipad to my garageband on my mac

    How can I get the music from garageband on my Ipad to my garageband on my mac

    You want to uses iOS file sharing with iTunes on the Mac. Read about it here.
    http://help.apple.com/garageband/ipad/1.2/index.html#chsec12c387

  • Got a new iPhone that I've been using for about a month now, so the question is how can I get the pictures from my old iPhone and keep the pictures I have on the new iPhone?

    Got a new iPhone that I've been using for about a month now, so the question is how can I get the pictures from my old iPhone and keep the pictures I have on the new iPhone?

    Connect old iPhone to computer and save the pictures on computer.
    Connect new iPhone and sync the pictures to your new iPhone.

  • V5 How can I get the code from an itunes gifcard that got scraped off

    How can I get the code from an itunes gifcard that got scraped off

    Try Here  >  http://support.apple.com/kb/TS1292
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I have a shuffle and it dont work so i got a nano how can i get the music from the shuffle to the nano

    i have a shuffle and it dont work so i got a nano how can i get the music from the shuffle to the nano

    Hi tak661_99m,
    It sounds like you want to transfer music from your older iPod shuffle to iTunes and then sync it to the new iPod nano. Take a look at the article below for more information about transfering music from your device to iTunes. The way you transfer the music to the new iPod nano will vary depending on where the music came from and whatever is most convenient for you.
    iTunes: Transferring media from your iPhone, iPad, iPod touch, or iPod
    http://support.apple.com/kb/ht1209
    Media type
    Transfer method
    Music purchased from the iTunes Store
    Transfer your media through iTunes.
    Download your media through iTunes in the Cloud1.
    Download your media through iTunes Match2.
    Music imported from a CD or other source
    iTunes can't transfer this media back to your computer.
    Back up your iTunes library or use iTunes Match2.
    iTunes in the Cloud is supported on up to 10 devices:
    iPhone
    iPad
    iPod touch with iOS 4.3.3 or later
    iTunes for Mac or Windows 10.3 or later
    If you use an iPod classic, iPod nano, iPod shuffle, or earlier iPod model, use iTunes in the Cloud within iTunes on your computer. Previously purchased content may be unavailable if it's not in the iTunes Store. Learn more about
    downloading past purchases from the App Store, iBooks Store, and iTunes Store
    and
    which content types are supported for iTunes in the Cloud by country
    iTunes Match is supported on these devices:
    iPhone
    iPad
    iPod touch with iOS 5.0.1 or later
    iTunes for Mac or Windows 10.5.1 or later
    If you use an iPod classic, iPod nano, iPod shuffle, or earlier iPod model, use iTunes Match within iTunes on your computer. iTunes Match is subject to subscription purchase and
    availability
    . Learn more about
    subscriptions to iTunes Match
    -Jason

  • I have a sony hdd camcorder, how can i get the videos from it to my macpro?

    I have a sony hdd camcorder, how can I get the viedos from the camcorder to the macpro?

    If you have iMovie it can import video from most camcorders, but not all.   It comes with every Mac Pro.    If you need to restore it from the original installer discs, these are the directions:
    http://support.apple.com/kb/HT2604
    Typically iMovie can import if you connect via IEEE 1394 or USB.   IEEE 1394 comes in three flavors:
    4 pin (typical for many camcorders), 6 pin (known as bus powered Firewire 400), 9 pin (known as Firewire 800 or 1394b).   Cables exist to connect each type of Firewire to each other.  Locate your Camcorder directions on Sony's website to determine what pinout exists if you don't have the manual.
    Double check on Sony's website there isn't a firmware update for compatibility with your operating system.
    Push comes to shove, you may have to install Windows on your Mac to connect the Camcorder.

  • HT2534 What is iTune gift card? How can i get the code from this?

    What's iTune gift card? How can i get the code from this?

    "What's iTune gift card?"
    It is a gift card like any other gift card.  It is a card that contains credit for purchases in the itunes store.
    "How can i get the code from this?"
    Genreally there is a scratch of area under which the code lies.

  • HT1848 how can i get the music from itunes on my pc to transfer to my iphone?

    how can i get the music from itunes on my pc to transfer to my iphone?

    The only supported method to get media onto an iDevice is via iTunes.  Read the User's Guide it will describe how to do this in detail.
    iCloud does not put media on the device, but using iTunes Match and iCloud it is possible to have access to all media that exists on your computer, but only when the device has Internet access.  It will not load media onto the device.
    Use of 3rd party tools to transfer files to the device is not supported.

Maybe you are looking for

  • Code to transfer xml file to abap internal table using transformation

    Hi friends Given the following xml file .the requirementis to  display and transfer the xml file to internal table usin transformation and gui_upload.If any onehaving simple code on this please send . Can any one sugest the steps to be followed to wr

  • Document 4500016031   does not contain any selectable items

    Hi Friends, I am doing MIGO(godds receipt) and adopted following procedure for MIGO. ME5J----->(Entered my Proj. defn---> executed Select material T-20610. Click the "Assign automatically" pushbutton. Assign materials T-20620 and T-20630 the same way

  • New sequence not conforming to clip settings

    I'm using FCP 6.0.6. I've got some iPhone 3GS video clips (shot with the Super 8 app). When I create a new sequence, and then drag one of the iPhone clips to the sequence, the sequence does not conform to the low res iPhone settings. I've tried setti

  • Service Cancellation Cost?

    Is there any way to find out online what the cost to break my contract will be as of a certain date? I'm not too thrilled with my current phone, and am looking to move to a smartphone. My cable/internet provider is offering some enticing wireless dea

  • One BR to copy data in two plan type

    Hi, I encountered this problem with the business rules. In order to run the what-if scenario analysis, I would like to be able to copy the data from one version to another version using a business rule. However, currently I have two plan type within