Press on Button and release outside the button armed frame

Press on Button using the Mouse and release outside the button armed frame does not generate MouseEvent.
Or Press on the Button outside the armed frame and release inside the armed frame does not generate MouseEvent.
Window 7
java version "1.6.0_22"
Java(TM) Platform, Standard Edition for Business (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
The question :
Is this normal behaviour for Java Swing. Does this exist in the java specification? any idea ? or is this a bug ?
the sample code below for you to test
public class PanelButtonArmedFrameClick extends JPanel
   private static final long serialVersionUID = 1L;
   private JButton btn;
   public PanelButtonArmedFrameClick()
      btn = new JButton("Click on \n the button");
      this.add(btn);
      MouseListener mouseListener = new MyMouseAdapter();
      btn.addMouseListener(mouseListener);
   private static class MyMouseAdapter extends MouseAdapter
       * {@inheritDoc}
      public void mouseClicked(MouseEvent e)
         JOptionPane.showMessageDialog(new JFrame(), "Button clicked");
   public static void main(String... args)
      SwingUtilities.invokeLater(new Runnable()
         public void run()
            JFrame frame = new JFrame("Testing");
            JPanel panel = new PanelButtonArmedFrameClick();
            frame.getContentPane().add(panel);
            frame.setPreferredSize(new Dimension(500, 500));
            frame.setMinimumSize(new Dimension(500, 500));
            frame.pack();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
}

Sure this is not a bug and this is the behavior of mouseClickedEvent.
mouse clicked = mouse pressed + mouse released.
mouseClickedEvent is a combination of mousePressed and mouseReleased evenst which are generated at the same pixel location. So if you generate mousePressed and mouseReleased events at different locations you will not get mouseClicked event.
Thats why you are not getting mouse clicked event when you are performing mouse pressed event on one place and mouse released event on another place.

Similar Messages

  • If I want to open the same website in a second tab and press Ctrl+T and start typing the website title or URL, why does Firefox 4 insist on switching to the first tab? Is it possible to turn this off?

    I regularly need to open the same website in two tabs, to be able to view changes made between opening the first and second tabs. In Firefox 3.x I could press Ctrl+T and start typing the website title or URL, which would be auto-completed by Firefox. This enabled me to quickly open the same website in a second tab. Firefox 4 does not do this, instead it wants me to switch to the existing tab. This is not what I need.
    Of course it is possible to open the same website in a second tab via e.g. a bookmark, but this takes more time and effort. It would be great if I could select Firefox's behavior in this situation.

    To create a duplicate of an existing tab in Firefox 4, do one of the following:
    *middle-click the icon on the left end of the URL/Location/Address Bar
    *hold down the Ctrl key and drag the tab until a small arrow appears at the border between tabs, then release the mouse button, then release the Ctrl key.
    <br />
    <br />
    You have multiple Java Console extensions because Java did not clean up after itself when updating; Firefox button > Add-ons > Extensions OR, using the Menu Bar, Tools > Add-ons > Extensions:
    *Java Console 6.0.17, Java Console 6.0.19, Java Console 6.0.20, Java Console 6.0.21, Java Console 6.0.22, Java Console 6.0.23
    Using the instructions here:
    *http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    you can delete the following folders:
    *{CAFEEFAC-0016-0000-00'''''17'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''19'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''20'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''21'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''22'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''23'''''-ABCDEFFEDCBA}
    You can leave {CAFEEFAC-0016-0000-00'''''24'''''-ABCDEFFEDCBA}
    <br />
    <br />
    '''You need to update the following:'''
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.3"
    *Shockwave Flash 10.2 r152
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Shockwave for Director'''
    #*NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    #*Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place so you can find it).
    #*When the download is complete, exit Firefox (File > Exit)
    #*locate and double-click in the installer you just downloaded, let the install complete.
    #*Restart Firefox and check your plugins again.
    #*'''<u>Download link and more information</u>''': http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE

  • Remote location, 7kbs d'load speed, 10 days to d'load Lion, only software updates are through the App Store. Why can't we d'load and install outside the Cloud anymore? Some of us can't use the cloud.

    Remote location, 7kbs d'load speed, 10 days to d'load Lion, only software updates are through the App Store. Why can't we d'load and install outside the Cloud anymore? Some of us can't use the cloud and never will be able to.

    That is true - I apologize for not being specific - what I was mainly referring to is iLife applications. I have a notice on the App Store that says 3 apps need updates, I look at the apps and they are huge so since my connection is so slow I use my work connection and d'load the files from support to my Windows machine and carry them home, once d'loaded my MacAir states it cannot install, the update must come from the App Store.
    I do the same thing for large Leopard and Lion files and I can install them without error, it is just the App Store files that the system stops.

  • For some reason my dictation isn't working. I press command twice speak then press it again and I get the three lights and nothing. I went in and made sure mic was on and dictation was on any suggestions?

    For some reason my dictation isn't working. I press command twice speak then press it again and I get the three lights and nothing. I went in and made sure mic was on and dictation was on any suggestions?

    Hi there davestriderisironic,
    You may find the troubleshooting steps in the article below helpful.
    Troubleshooting issues with no audio from built-in speakers on Macs
    http://support.apple.com/kb/ts1574
    -Griff W. 

  • I was working on my 96page catalog with over 2000 photos and out of the blue my frame edges vanished even on the paste board and they are not hidden and are on

    I was working on my 96page catalog with over 2000 photos and out of the blue my frame edges vanished even on the paste board and they are not hidden and are on

    You won't see the frame edges if you are in Preview mode, so you should use Normal mode if you want to see them. You can turn off the Document Grid in the View menu (View>Guides & Grids>Hide Document Grid).

  • Problems with Siri and Contacts (outside the US)

    I have 3 major software problems (bugs) and i would like to report them in hopes that Apple would release a quick and prompt fix for these problems.
    I think i speak for many when i say ever since the IOS 5 release users have noticed a major issues/problem with the format of their contacts and area/country codes.
    Problem # 1.
    I live in Kuwait, and all my contact details have a country code (GSM) prefix +965 followed by 8 numbers. With the last IOS 5 release whether you add or remove the prefix the contact's name is not displayed on the caller ID. I tried to save the contact as it shows on my Caller ID but the problem presisted. I even tried switching international assist on and off and that didn't work either. There's a huge forum for Apple customers outside the US facing problems with their contacts and caller ID ever since IOS 5 was lanuched.
    Problem #2.
    I have bought my Iphone 4S just few days ago, excited about Siri like many, i asked Siri to call George from my contacts, and Siri replies i'm sorry i can't call george, i tried all my contacts and all attempts failed, i tried adding the country prefix, and removing it and still Siri can't make calls from my own phone book (contacts). I do realize that Siri is in Beta, however, Siri did dial a US number perfectly from Kuwait, which tells me the problem is again related to where you are, and what country code format are you trying to call.
    Problem # 3.
    When setting up Imessage, Kuwait is not listed in the countries of choice, not sure why but it would good if all the countries are listed.

    vindictive1 wrote:
    I have 3 major software problems (bugs) and i would like to report them in hopes that Apple would release a quick and prompt fix for these problems.
    Then report them to Apple here.  This is a user to user support forum.

  • Getting Siri to understand home and work outside the USA

    I've just written this up in my blog
    You've told Siri which contact is you. You ask Siri "Remind me to talk to Michael when I arrive at work" but it just replies telling you that it doesn't know where your office is - but you've got an entry in the address book for "work"!
    It's probably iCloud and Mac OS X working against you.
    Address Book on OS X supports multiple address formats - some of which looks very much like the location you're in and you may not have changed them.
    To persuade Siri to understand you need to change the address format - locate the contact in Address Book and click edit. Click the label on the offending address and a context menu will appear - at the bottom there's a sub-menu which allows you to change the address format. Choose the appropriate one and click Done.
    Now, once iCloud has synced which doesn't take long, Siri will beable to set reminders for home and work without problems.

    I too had the same problems as everyone else on here but I've sussed it out how to do it. Go on google maps on your phone and find your home or work etc on the map. Now on your home press your finger on the screen and it drops a pin with a blue arrow.
    Click on the blue arrow
    click on add to contacts
    click on add to existing contact
    find your own contact details and click on it
    your details open up with the address you dropped the pin on now in your address field.
    click on edit at the top right hand side of the screen
    now scroll down to the address and click on the address description at the side of the listed address and select either home, work other or add custom label.
    The custom label is good for anything else you need to name. I have all our branches now listed under say, wolverhampton brach, telford branch etc. This way I can get siri to remind me where ever I want to go such as " remind me to get my tools back when i get to the "wolverhampton branch". Works 100% every time this way.
    Hope this helps you guys out.

  • Registration and setup outside the U.S.

    I'm a US citizen currently living and working outside of the US. I've just purchased a refurbished MacBook. Am I going to run into any problems trying to set it up and register it from outside the US. I ask because many of the online services (i.e. Pandora) are not aviable outside the US. Will "they" know that I'm outside the US when I register the new computer? And if so, will that cause me any problems when I return in several months time?
    Thanks in advance for your time and thoughts,
    ~

    There is no formal registration required for OS X. I'm not sure whether registering from outside the US would actually make any difference, but your warranty is not affected and you can formally register when you return to the US or have someone in the US register for you if you are concerned. All they need is the Apple part number (one that usually begins with an 'M') and the serial number. You could also fill out the printed registration form and mail it.

  • Build array within scriptblock and use outside the block

    Hi,
    I am using scriptblock to run several commands in parallel. The code working fine. BUT I am trying to build an array of object within the scriptblock. My aim is to have all execution results in one array and after exiting the script block to print the results
    from all run. I notice that what i build within script block getting destroyed and in the end the $result variable is null. Is there any way that I can build and accumulate the results in a variable and use that outside scriptblock?
    code:
    $result= @()
    ForEach ($Command in $Commands)
        While (@(Get-Job -state running).count -ge $MaxThreads){      
        Start-Sleep -Milliseconds $SleepTimer
        Start-Job -scriptblock {
    $n = $Command
    $result += New-Object Psobject -property @{DATE = (Get-Date -format "MMddyy"); RESULT = $n}
        } -ArgumentList $Command -Name "$($Command)job" | Out-Null
    While (@(Get-Job -State Running).count -gt 0)
        Start-Sleep -Milliseconds $SleepTimer
    ForEach($Job in Get-Job)
        Receive-Job -Job $Job
        Remove-job -Force $Job
    $result

    Yep, but my real problem is that every now and again I just can't help myself and end up feeding the troll.
    I've had plenty of fun recently watching it twist in the wind and blather on about absolutely nothing of any substance. I'm assuming we'll get another missive across these threads later (dance puppet, DANCE)...
    The real shame though is when it ends up attacking the poor random OPs for asking a question. We're used to dealing with it so I can laugh at the situation, but it does bother me that the people who are just out looking for help end up getting lambasted
    by some complete jerk.
    I'm going to keep on ignoring it, hopefully if we all just stop playing along it'll get tired and go be useless somewhere else.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)
    Offensive as he (?) can often be, it is difficult to take his attacks personally, because he obviously has no clue what (or who) he is talking about.
    What bothers me more about this phenomenon is:
    the disrespect shown to people just looking for help;
    the impact on the effectiveness of the forum with all the time and space wasted for no purpose;
    the troll himself, who seems to either be suffering some kind of emotional or personality disorder, or is playing some kind of game without concern for its effect.
    He doesn't get much positive feedback here, so perhaps he just feels that being able to write the way he does in a public forum, and get some response, is enough to prove his worth to his ego. Unfortunately, we will probably never find out more about him
    than is evident from his posts.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.
    Seems to be a "tagger" mentality.  Marking territory with acts of vandalism.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Can IPhone be activated and used outside the US on other networks?

    Dear all,
    I was wondering if the iPhone can be launched and activated to operate outside the United States, any other country using their networks or its just exclusively by AT&T..?

    You have to activate the iPhone on the AT&T network. However, you can ask AT&T to enable international roaming and use it in other countries. If you do not have international roaming enabled, you can still do email and internet browsing when you are connected to wifi in other countries, but no phone service or sms.
    Other users report spotty international roaming performance for phone calls and sms. Also, international roaming for phone and data (other than on wifi) is extremely expensive.

  • Week No. on new P45 forms does not align and prints outside the ...

    The new P45 sapscript (HR_GB_P45_A4_D & HR_GB_P45_A4) does not align the Week number within the box of the pre-printed HMRC stationery. The week number appears on all three forms (1/1A, 2 and 3), being page 1,2 and 3 of the sapscript, and all are printed out of their appropriate box.
    Has anyone else encountered this problem ?.
    I can correct this as we currently use a Z version of the sapscript. I have checked the Z version (a recent copy) of the SAP original sapscript to ensure that the original will also have a mis-alignment, which it does. However, despite changing this I would still like SAP to correct their mistakes. I must admit I am VERY surprised that nobody else has encountered this problem as any week number being displayed on either the HR_GB_P45_A4 or HR_GB_P45_A4_D form will not align correctly.
    Jason
    Edited by: Jason Stratham on May 26, 2009 2:55 PM
    Edited by: Jason Stratham on May 26, 2009 4:28 PM

    P45 form printing to tray 1,2, and 3.
    On a slightly related subject we occassionally find that our lexmark three bin printer seems to forget it's bin setup and every now and then the pages will come out on the wrong HMRC pre-printer stationey. We have double-checked the paper loaded and we ONLY have the P45 form 1/1A in try 1, form 2 in tray 2 and form 3 in tray 3. However, despite this it still occassionally goes wrong, with the form 1 and 2 printing to tray 2 and form 3 printing to tray 3. This normally happens after a long weekend, so I don't know whether this is a printer driver caching problem or suchlike. Has anyone had any similar problems?.
    Jason

  • I was trying to post a message on Facebook on the wall but didn't know what to press so I tapped just outside the box and suddenly a number added itself to my message which I recognised as one of my credi cards which I quickly deleted.How could this happe

    I was trying to post a message on Facebook but didn't know what to press as I don't often use it, so I tapped edaround the message hoping this would work but what happened was that a line of numbers were added to th message which I recognised as one of my credit cards.As I have never bought any thing on Facebook and I try not to store my cards I quickly deleted the numbers from the message and finally posted my  message by pressing the return key on my Ipad. Can you tell me where my credit card number came from?

    The clipboard is a place in memory where text that has been copied from is temporarily stored ready to be pasted elsewhere.
    The clipboard cannot be viewed, and is essentially invisible to the user. Copied text will stay on the clipboard until it is replaced by the next piece of copied text.
    Probably what happened is you copied your credit card number from somewhere, either intentionally or accidentally (perhaps you made a purchase on your iPad using this card recently), and the clipboard stored the number. Then, whilst you were using Facebook you (accidentally) pasted this credit card number from the clipboard into your Facebook message.
    That's the only likely reason I can think of. Hope I explained it well enough!

  • Is there a roadmap for Edge Animate for new features and releases in the future?

    where can i found a roadmap for the next releases of Edge animate and new features?

    Hi tsiky64,
    I think you might need to check the screen shot attached: Tech specs | Adobe Reader XI
    To download other version of Reader you may visit : Acrobat-Reader Enterprise Toolkit Home
    Regards,
    Ajlan Huda.

  • My iPod nano 2nd edition has died on me. I can press on menu and centre of the wheel and the apple logo comes on for seconds, then I get a glimpse of the menu list then the screen goes dead. What can I do? Can anyone help please?

    MY iPod Nano 2nd generation iPod has died on me. I've charged it both by connecting to my laptop and also separately. I press the centre wheel and menu and the apple logo appears for a few seconds, then I get a glimpse of the menu then it disappears again. I have tried everything even leaving it plugged into the power for about four hours but it made no difference. What can I do?

    Probably not a good sign especially given the age of the device.  Are you able to get it into Disk Mode long enough so that you can restore it in iTunes?
    Putting iPod into Disk Mode
    Otherwise, it might be time to have the iPod serviced or replaced.
    B-rock

  • RMI - NAT - Client within the LAN and outside the LAN

    I'm having an RMI server in a machine within a LAN with the private IP 10.XX.XX.XX and a NAT with the public IP 196.XX.XX.XX.
    I am using the property: java.rmi.server.hostname to 196.XX.XX.XX. The server is behind a NAT machine.
    Everything works fine when the client is outside the LAN, but when the client is within the LAN it fails to lookup the server (of course it would work fine if I ommit the java.rmi.server.hostname property or set it to the server IP, but then I cannot work with a client outside the LAN).
    To conclude, my question is how I can work with both clients simultaneously (one within the LAN and one outside the LAN)?

    Most firewalls block access from inside the network to the external IP address (10.x.x.x to 196.x.x.x) as this approach could also be used by an attacker masquerading as a local network computer.
    You're going to need to make sure that all your Internal computers do not go via your firewall to get to the server.
    You can either add a route to the server on the Internal client machines overriding the default routing table or you can use your public domain name instead of the IP address. Then change your internal DNS configuration (if you use one) to point internal users to the local IP address instead.

Maybe you are looking for

  • How can I access my Airport Time Capsule from a remote location?

    I have my 2 TB Airport Time Capsule connected to my home wireless network and I have heard it is possible to access my information stored on it from anywhere, but I have no clue how to do this.

  • How to get default baseline date in a payment terms

    Hi, We have around 160 payment terms used in our system. We want to get the default baseline date for all these payment terms. Going to each individual payment terms and getting the default baseline date is a cumbersome job. Is there any easy way to

  • My MacBook Pro pwers up but does not get past the the Apple logo.

    I have a MacBook Pro with Mountain Lion.  It powers up but does not get past the Apple logo.  The hardware test did not reveal any problems.  It will also not get any further when I try to start up in Safe Mode.  The last thing I was trying to do was

  • Mirroring ipad to apple TV dosen't work

    Hi i downloaded all my IOS update , but when i try mirroring , i can see the bleu bar on top  of my ipad it blinks a few times then dissapear and on my TV i still see my apple TV menu. But i tried it at my friend and it works???? do you think it's my

  • View documents created using MacDraw Pro & Print Shop Deluxe on an iMac

    I have documents created using MacDraw Pro and Print Shop Deluxe and would like to view them on an iMac running Snow Leopard. Do any applications exist that will open either flavor document into a format that looks as similar as possible to the origi