ListTransferHandler in DropDemo has a bug

Hi -
I would like to enable Drag and Drop in a JList containing Strings. To do that, I used the ListTransferHandler.java that is used in the DropDemo. Unfortunately, this ListTransferHandler.java has a bug. You can try that yourself by enabling the 'insert' drop mode and dragging, say, 'List Item 3' to the top of the list in the DropDemo: http://download.oracle.com/javase/tutorialJWS/uiswing/dnd/ex6/DropDemo.jnlp
I tried to find the bug, but was not successful. To me it is interesting to see that the importString() method is not called, and, therefore, the addCount variable never get's updated.
So am I missing the point of enabling DnD in a JList? Don't I need to implement a ListTransferHandler myself? At least it did not help to use a 'blank' TransferHandler jScriptList.setTransferHandler(new TransferHandler("text"));
Has anybody a working ListTransferHandler for me please?
Thanks and best regards,
Kurt

When I try to drag and drop and item, such as "List Item 3" over "List Item 1", "List Item 1" is removed from the list and "List Item 3" is put in its place. If I drag and drop some text from the textbox, the item in the list area disappears.
During the drag and drop process, the 'drop' action results in the following exception:
Exception in thread "AWT-EventQueue-0" java.security.AccessControlException: access denied (java.awt.AWTPermission accessClipboard)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkSystemClipboardAccess(Unknown Source)
     at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(Unknown Source)
     at sun.awt.datatransfer.TransferableProxy.getTransferData(Unknown Source)
     at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(Unknown Source)
     at dnd.ListTransferHandler.importData(ListTransferHandler.java:46)
     at javax.swing.TransferHandler$DropHandler.drop(Unknown Source)
     at java.awt.dnd.DropTarget.drop(Unknown Source)
     at javax.swing.TransferHandler$SwingDropTarget.drop(Unknown Source)
     at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)
     at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)
     at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)
     at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)

Similar Messages

  • HT201412 After ios7, My iphone4 has gone dead twice in a time frame of around two months...even though its not happening very often but a two month Old phone going dead just after a New update is not acceptable.probably ios7 still has sum bugs dat need to

    After ios7, My iphone4 has gone dead twice in a time frame of around two months...even though its not happening very often but a two month Old phone going dead just after a New update is not acceptable.probably ios7 still has sum bugs dat need to be fixed...Can this bug expected to be fixed in the next update...

    Hi 1283ar.
    Unfortunately, iOS 7 is too hard to push for the iPhone 4 and therefore has a lot of effects turned off to try to get it to run as smoothly as possible.
    However, it becomes better and better with each update coming but it's hard to do anything about the hardware on an already released phones.
    If you still have trouble or think they are too hard. My tip is, if so, to restore your iPhone 4 and make a clean setup with no iCloud backup. But all your photos in a photostream so you can access it later.

  • Version 3.6.14 has a bug & does not support Java to play Pogo games - How do I install a earlier version?

    Pogo games plays on Java - the last version of Firefox 3.16.14 has a bug that does not support Java - I have been instructed by Pogo to install an earlier version of Firefox. How do I do that?

    Firefox 3.6.15 was just released to fix that Bug.
    You can use Help > '''Check for Updates''' to trigger an update to Firefox 3.6.15.

  • Why does auto brightness has a bug in iOS 7.1.1 . The brightness switches automatically to higher in bright places but not returns to lower brightness in dark places but when you lock and unlock it becomes normal

    Why does auto brightness has a bug in iOS 7.1.1 . The brightness switches automatically to higher in bright places but not returns to lower brightness in dark places but when you lock and unlock it becomes normal

    Hello,
    Same problem for me. Really a pain in the *** this bug ! Does Apple fixed it. I'm really suprised noone reports this problem  and apple does not adress this.
    Because of that, I cannot give it anymore to children because it hurts the view. Really a shame on the part of apple !
    Regards

  • My Iphone 6 Screen has been bugging Please Help

    My Iphone 6 Screen has been bugging out lately it bounces up and down and just gets really blurry. Does anyone know how to fix this?

    Hi,
    By "Bounces up and Down", do you mean this:
    The content of the screen drops down and about a third of the top of the screen is blank.
    When you press the home button or any icon, the content moves back to the top of the screen.
    If this is what you are seeing, it is intentional. It is meant as a way for you to be able to easily reach the icons at the top row of the screen.
    Double tap the home button. Do not press the button, just lightly tap it.
    All the content should drop down.
    Pressing the home button or any icon will shift the content back up again.
    This is a new feature designed for the larger screens in the 6 and 6+.

  • It has a bug in the calendar of IOS 7.0.3

    It has a bug in the calendar of IOS 7.0.3!!!! For exampplo, today is TUESDAY, the 29th and the calendar shows WEDNESDAY!
    Can anyone help me how to solve this problem?
    Thanks in advance,
    Fabiola Cargnino

    See this discussion. https://discussions.apple.com/thread/5498033?tstart=0 it seems to be only happening in one geographic area.

  • Reader 9 has a bug, Reader X is a step backward.

    I upgraded to X because the latest reader 9 wasn't highlighting search / find terms consistently. Now with X, not only does it superficially look like a older version of reader, the toolbar customization is difficult, limited, and the search / find box is gone unless you hit the find button (or ctrl + F or apple + F). I use this feature all the time in writing scientific publications where I have to find a key word quickly when I'm reviewing articles and its very handy to just have the search bar on the toolbar. It just seems like this version has less features and versatility than the last. But the last has a bug, so I'm left with two less-than-optimal PDF viewers instead. Sure the some of the new features are going to be nice with X, but overall I think they took a step backwards with this new version, and should have fixed the bug from 9.4.5 first.

    I believe it was fixed with the 9.4/8.2.5 updates. See page 5 of the following: http://kb2.adobe.com/cps/837/cpsid_83708/attachments/Acrobat_Reader_ReleaseNote_9.4_8.2.5. pdf

  • New version 18.3.1.C.1.16 Xperia M2 D2303 has a bug again accelerometer (auto-rotate)

    The new version 18.3.1.C.1.16 (Customized CE1_1281-1548_18.3.1.C.1.16_R1B) Xperia M2 D2303 has a bug again accelerometer (auto-rotate). In the previous it was already repaired 18.3.1.C.1.15. During a phone call again suspended accelerometer (auto rotation).

    Are you talking about this thread?
    https://talk.sonymobile.com/t5/Xperia-M2-M2-dual-M2-Aqua/accelerometer-bug/m-p/984742#M5800

  • IOS7 has some bugs, Swipe changing lock screen! iphonehassomebugs

    Hi everyone,
    Iphone has some bugs(Part 1)
    Check this video for my very first bug experience,
    http://www.youtube.com/watch?v=QK_nIq4b82s&feature=youtu.be
    Steps to reproduce the issue:
    1. Keep the lock screen wallpaper and the home screen wallpaper different,
    2. Swipe right to unlock and swipe to the left immediately after you reach the right-end. Watch video for more reference.
    Other bugs on the way! .
    Regards,
    Sathish.

    Hmm, I have different wallpapers (one of my photo's for my lock screen and and just plain black for my home screen) and mine still does not do that.
    Try setting them both to something different, but simple - say different colors of one of the default screens.  Or just try one any pair of the default screens instead of your own custom pictures.  Does it still do it?  I cannot seem to get my iPhone to duplicate that no matter what I try with it.
    You can submit the info to Apple at http://www.apple.com/feedback/iphone.html  but try and give them as much details as you can, of anything you have tried that either does not change the abnormal behaviour or that does fix it.

  • Skype 7.0 has a bug with webcams.

    Skype 7.0 has a bug with webcams.
    In previous versions there could only be 10 people actively in a call for webcams to work. I constantly have a call where there are 12+ people in the call (not talking, but using the IM features of the group, so not in voice chat). Normally webcams are a non-issue and we can always turn them on.
    In the newest version of skype (7.0) you cannot turn on webcams if there are more than 10 people in the call (IM or Voice). Anyone with 7.0 can see the webcams just fine, but cannot enable it themselves. If they turn on video with 10 people in the IM then add more, the webcam will stay on but cannot be reenabled.
    This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content. A link to this post appears where the post was originally added.

    According to AT&T Technical Support, the "Wireless #" on the tablet box from AT&T is only an identifier for the 3g/4g signal, and cannot be used from by any (known) application as an actual phone number.
    If anybody has found a way to use the AT&T "Wireless #:" with Skype or another app, I'd appreciate learning about how to do it.

  • Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface.

    Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface. A recent network University policy change. The only way to fix this, is if you use a manual proxy configuration in Firefox. So all 100 + uni iMac's can only use Safari as I would need to do a profile push to all 300 students and I am unsure what file carries the proxy information.

    Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface. A recent network University policy change. The only way to fix this, is if you use a manual proxy configuration in Firefox. So all 100 + uni iMac's can only use Safari as I would need to do a profile push to all 300 students and I am unsure what file carries the proxy information.

  • Got my iphone 4s today but the camera has a bug that i cant find reported anywhere

    Got my iphone 4s today but the camera has a bug that i cant find reported. When i take a picture or filming the camera screen shows the buttons in landscape mode( the buttons are at the bottom in landscapemode instead of the bottom end of the phone) and the object i am filming shows up 90 degrees rotated. If i hold the phone in landscapemode the object moves 90degrees rotated too. In i pan the phone the image on the screen goes up and down insted. Very weird.
    But when i check the video there is nothing wrong with the movie. Please help....

    Contact Apple and inform them you have AppleCare +. If your phone is working correctly they may or may not replace it, only they can anwer that question.

  • Cirrus has a bug for a long time

    [ Before start a discussion, I tell you that my English is not good. If you read kindly, I appreciate you ]
    I found a bug from Cirrus network connection in AS3.
    But I liked Cirrus very very much, because It needs no AIR Runtime for Server and has UTP Hole punching and etc...
    So I just waited and waited that the bug will fixed by ADOBE.
    I wanted it very very much.
    But a few years laters, the bug still exists.
    I explain the bug on this post.
    [Server] Netstream.publish('name')
    [Cient] Netsteram.play('name')
    This methos makes Cirrus connection between Two peers finally.
    I followed example code sincerely in Adobe document.
    It succeed.
    But It failed sometimes.( This is the bug! )
    ## FEATURE ##
    1. There is about 40% probability of fail to make a connection.
    2. There is no event of disconnection.
    3. There are no error messages and any no response of failure of connecting.
    4. If server's IP address and client's IP address are same, It succed 100% to make a connection.
    5. If a client fails to connect a server once, the client will never succed to connect same server even though It tries again and again.
       If the client has to connect the server, the client needs to refresh the program to gets a new Netconnection ID.
    6. If a client fails to connect a server, another clients have some probablities to connect to same server.
    I made many online games with Cirrus and a lot of users are playing with that.
    They need safe connecting method very much.
    Please help them and me.
    Thank you.

    1. P2P connections are not always possible depending on the configuration of NATs and firewalls.  for an explanation, please see this posting:
      https://forums.adobe.com/message/1064983#1064983
    to understand what's really happening, please see
      http://tools.ietf.org/html/rfc7016#section-3.5.1.6
    2, 3. there should be an event after a timeout, around 2 minutes.
    4. that's expected.  the "behind NAT" local addresses should be reachable on the same computer.
    5. that's expected.  the failure to connect is because a P2P path can't be found.  see answer 1 above.  however, you don't need to reload the SWF -- you just need to make a new NetConnection to get a new peer ID.
    6. that's expected, see answer 1 above.
    since P2P connections aren't always possible, you might need to provide a server for client-server-client fallback when P2P doesn't work.

  • Has this bug been recognized?

    My understanding is that WD TV Media Player ver 1.02.17 is the same as the version that should be rolled out to fix 2.02.32 on the SMP. So I broke down and bought the Media Player, upgraded to 1.02.17 and immediately came across this bug. When resuming a video, the movement keys (FF, REW, and Pause) don't work.  You have to exit out of the video, and come back in, and sometimes, after trying a few times, it might work, but usually not. The only way to make it work for sure is to exit, come back in and start from the beginning, skip to the point you were at, and then those keys will work. I noticed this once or twice after I upgraded my SMP to 2.01.86, but on the Media Player, it's frequent.  Never saw it before 2.01.86. Also, when using FF and then pressing play, it will sometimes kick you out of the video, back to the list. The other reason I bought this Media Player is I was curious about one of the newer services.  Unfortunately, that service is not suported in my area.  And after playing with some geo-unblocking, it appears Media Player doesn't support geo-unblocking.  Apparently the SMP does, but not this "newer" model. It's being returned tomorrow. Words cannot describe how pathetic the latest releases have become. 

    Not sure if I posted this correctly so I am replying to your comments as I am having almost exact same issue and it is driving me crazy, please see my post below. Best,Anthony   I have been losing my mind over this for 3 months now.I have 4 WD TV Live's and the Media Hub and they were all working great for the longest time.Now the PAUSE BUG has hit them all and I have tried everything!It is not my network as I get the same bug now on a movie on a USB or an external drive.Wired or wireless.I have reset, downgraded, upgraded, everything.Almost any movie I am about 20 minutes in to when I hit the Pause button gives me the cant play the format error and keeps playing in the background, the unit has to be reset completely.I am so frustarted!!!PLEASE HELP !!!!!!!!!Thank-you,Anthony

  • PDF in Safari: Fonts not displaying correctly: Has this bug been fixed?

    Last year I was trying to view a PDF on the iPad with Safari, and there was a font corruption problem: On zooming in, the type would become garbled. Now granted, I was using a non-standard font (Univers Type 1). I also noticed this problem with certain magazines in the MagCloud app. I decided to work around the problem by converting my type to outlines; while this worked, it made the PDFs much larger in file size.
    I checked this bug again under iOS 4.3 and could not replicate it. I've found anecdotal evidence out there that as of iOS 4.2.1 this may have been fixed, but I can't find confirmation. Any help in this regard is much appreciated. I need to present my project managers with discrete evidence that this bug has been fixed before they'll allow me to go ahead with "live" type -- and as we all know, the plural of anecdote is not data. Thanks.

    Apologies, I should also make clear another key point...where it's blowing out (multiple places), I'm using apex_item within the SQL to render the form. So that's where the problem lies

Maybe you are looking for

  • Help plz cause our prof won't help us

    ok, due to the fact that our professor Java feels himself way to god to give us (my class and I) an answer I post it here. //It's in Dutch but you should figure it out. class Kaart private final String[] color = {"zwarte","witte"}; private final Stri

  • ISync 1.5 with Cingular Razr V3xx compatibility?

    Does anyone know if there is a way to use iSync 1.5 (OS X 3.9) with a Cingular Razr V3xx? (I've seen the posts about third party plugins for new versions of iSync but I won't be buying a new computer for 3 months and I need my contacts!!!). Many than

  • Executing a function when application loads and Automatically refreshing

    Hello, I am new to JSF and would like to load an application by calling a function in 1 of my java classes. I am currently doing that, successfully, on a click of a button but would like the function to run onLoad, without the button click. In additi

  • Powercord not working. is this covered in the warranty??

    just a few minutes ago the light on my power cord stopped lighting up. if i wiggle the cord around in one place the light goes on for a second. so in other words, i need a new one. is this covered in the warranty that comes with the mac when i bought

  • Ratings and Comments vs Ratings and Comments?

    A little background, we are currently on CQ 5.4 but are working on migrating to AEM 5.6.  In 5.4 we overlaid the OOTB Comments/Ratings components so now when we upgrade we have a few issues that we need to work out.  While looking at the code differe