People, why you won't HELP???

Hi,
I am trying to move one panel(1) inside another one -
panel(2) with DnD. I think that everything works good, but only one problem. Can't change positioning (x,y) of panel(1) inside the panel(2). I am trying to use MouseMotionListener-mouseDragged(), but no help.
May be I am doing something wrong. How to connect action of MouseMotionListener with DnD.
Here is a part of my code.
class DNDPanel extends JPanel implements
DropTargetListener, MouseMotionListener {
int x;
int y;
public DNDPanel() {
super();
setBackground(Color.black);
setLayout(null);
add(new DraggablePanel()).setLocation(x, y);
addMouseMotionListener(this);
DropTarget dt = new DropTarget(this, this);
public void mouseDragged(MouseEvent e) {
x = e.getX();
y = e.getY(); // I think that problem hides somewhere here.
public void drop(DropTargetDropEvent dtde) {
if(isValidDragDrop(dtde.getDropAction(), dtde.getCurrentDataFlavors())) {
dtde.acceptDrop(dtde.getDropAction());
try {
Transferable xfer = dtde.getTransferable();
Object obj = xfer.getTransferData(MyFlavors.draggablePanelFlavor);
if(obj instanceof JComponent) {
add(new DraggablePanel()).setLocation(x, y);
// or here???
revalidate();
catch(Exception exc) {
System.err.println(exc);
exc.printStackTrace();
dtde.dropComplete(false);
else {dtde.rejectDrop();}
class DraggablePanel extends JPanel implements DragSourceListener,
DragGestureListener,
Transferable {
public DraggablePanel() {
super();
setBackground(Color.red);
setPreferredSize(new Dimension(100,100));
setBounds(0,0,100,100);
JButton button = new JButton("Beep");
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
Toolkit.getDefaultToolkit().beep();
add(button);
DragSource ds = DragSource.getDefaultDragSource();
DragGestureRecognizer dgr = ds.createDefaultDragGestureRecognizer(
this, DnDConstants.ACTION_COPY_OR_MOVE, this);
Thank you. I really need HELP!
Even if you will not help on subject, answer my question, please - People, why you wan't HELP???.
DM.

sorry it is DropTargetDropEvent...
why dont you get the drop point from DropTargetDropEvent passed through dnd..
like in drop(DropTargetDropEvent dte)
add(new DraggablePanel()).setLocation(e.getX(),e.getY());
}

Similar Messages

  • Why you r not Helpful !!

    before leaving this forum i want to tell you something.
    you r not helpful. you need someone asking a very profissional question to help him. why not helping one can not proceed and install the product that is so bad thing i asked more than one time and no one wants to reply me.
    i am sorry for that mail but you r really not helpful people.
    thanks

    Gamal,
    Sometimes this discussion forum is very busy, so not all questions can be answered as quick as possible. This discussion forum is a community of users that depend upon each other to answer questions.
    We try our best to answer as many questions as possible, but due to the immense volume of discussion here, only the most active questions or newest questions remain on the first page.
    I have sent you an email as well to help you with your concerns.
    Best Regards,
    Harry

  • The headphone jack malfunction Creative won't help me w

    I have a Zen Micro 6GB with a headphone jack on life support. I've tried contacting Creative for the location of a repair depot, but since it's paid for and the warranty's finished they've quit responding. I guess I'm on my own now, and it may not be a "Creative" solution that replaces the Zen. Supposing every company abandoned their customer after the warranty ran out. Wouldn't YOU try another brand Their website offered NO "creative" solutions, or direction to where you could get an otherwise good product once they had your money and had a replacement model to sell you. Well, I'm now looking at home repair, because unless I cough up for a long distance call to someone who may or may not have a repair solution for me, this puppy goes into the drawer with the other dead battery-operated devices, the electronic graveyard. Bye, Creative.

    Jonz,?I also am a newbie and I joined to look for people with your Zen Micro headset problem, so I could pass on the help I got. When you read below, you will know why Creative won't help you--Too much to admit!!!. The below web site provides guidance on how to probably fix the problem you have. I just fixed my daughters after finding this fix. When you open up your Zen, you won't believe how cheap the soldering is on both the Headset and the USB connection points. It appears to be generic the 6GB Micro. So, its not IF your Headset won't work, its just WHEN. These are not electrical connections, but rather connections that keep both Headset and USB pieces from moving on the circuit bd. There are 8 total. On my daughter's Zen, one of the four on the Headset module was just sort of laying on top of its mounting point, letting the Headset connector move a lot on the board, as if no solder was installed at all. The other 7 looked they were just glued down--waiting to come loose. Two things not mentioned in the fix.
    . When you take the metal casing out of the plastic cover, you may encounter two small cotter pins (not mentioned in the article). Instead of finding where they came from, I just reassembled the unit without them. No problem. 2. One of the Heaadset solder points (for me the one that was completely loose) is mid-on-the-board in between the?Headset and USB?connectors.
    The soldering iron adaptor I had would not?reach the point without melting all the Headset plastic and?possibly frying the Headset connection beyond repair. Had to buy a Radio Shack circuit board soldering iron?for about $8 with a narrow shaft and?long tapered point to reach the point. Fix went perfectly. Good luck.
    http://home.comcast.net/~mercx/?PaulyEddyFreddy

  • My router internet connection won't except googles 8.8.8.8. dns why can someone please help me, my router internet connection won't except googles 8.8.8.8. dns why can someone please help me

    my router internet connection won't except googles 8.8.8.8. dns why can someone please help me, my router internet connection won't except googles 8.8.8.8. dns why can someone please help me

    naaa didnt work if you or any body else has any other ideas im open cuase now im thining about just taking it into apple and getting a new one but my friend said that he recently did the exact same thing and the apple store declined him cuase it was jailbroken sooo i really dont know what to do ....the purpose of getting the knew ipod was to have imessge and the new facetime and know that it isent working i dont know what to do or how to do it the correct way...............but thnk u Eric Ross and llaass

  • I am unable to register my debit card after creating my apple ID. Whenever i click enter after filling all the debit card details, it shows that, "your payement method has been declined". Please help me people, why is it so.?

    I am unable to register my debit card after creating my apple ID. Whenever i click "continue" after filling all the debit card details, it shows that, "Your payement method has been declined". Please help me people, why is it so.? Also, i would ike to tell that my bank is, Union Bank Of India and it facilitates the auto conversion, rupee to dollar.. I think there is a different problem. Please help me guys.!!

    The card must be issued in the same country as the store you are trying to use. If you're trying to sign up for the US Apple Store, it must be a US card with a US billing address. If you're trying to sign up in India, it must be an Indian card with an Indian billing address.
    Apple will run a small charge, which will be credited back, to make sure the card is valid. If it is a debit card and you do not have enough in the account to cover the authorization, it will be declined.
    It is possible the currency conversion you mentioned may be causing a problem. Contact the issuing bank if you are sure you have enough in the account and you are signing up for the correct store.

  • How do you get your ipod touch to make a noise when people text you and to pop up on the screen my friend did something to her ipod to do this but i dont know how please help!!!!!!!!!!!!!!!!!!!!!!!!!!! its like she updated it but i already tried it!!!!!!

    how do you get your ipod touch to make a noise when people text you and to pop up on the screen my friend did something to her ipod to do this but i dont know how please help!!!!!!!!!!!!!!!!!!!!!!!!!!! its like she updated it but i already tried it!!!!!!i am very confused and want my ipod touch 4g like that please help thxns:)

    Go to Settings>Notifications and turn alerts/sounds on for the app(s) in question.  Not all apps have all options.

  • Texting on iPhone 5.  When texting to multiple people why does the contact list return to the "A"s after you select a contact and try to add the next one in order?

    Texting on iPhone 5.  When texting to multiple people why does the contact list return to the "A"s after you select a contact and try to add the next one in order?  This really slows you down when trying to contact 50 people with information.  iPhone 4 worked just fine.  Any suggestions on how to fix this?

    None of my pictures that I uploaded into iPhoto are in my Finder under Pictures.  Should I copy and paste my folders from iPhoto into here, in case something happens to my iPhoto program (in addition to backing them up onto an external hard drive like I already do)?
    No, that's just wasting space.  A back up needs to be on a different disk.
    Your photos are within the iPhoto Library.

  • I own osx mountain lion with messages.When i go to create a new message i dont undrestand why you can send it to their email.also is it possible to send a message from my mac to another mac that has mountain lion. MacBook, OS X Mountain Lion, help me

    I own osx mountain lion with messages.When i go to create a new message i dont undrestand why you can send it to their email.also is it possible to send a message from my mac to another mac that has mountain lion.
    MacBook, OS X Mountain Lion, help me

    The recipient needs to have Messages set up with the e-mail. Check the image below:
    Hope it heps.
    JP

  • Why i cannot update my new apple tv 3g and i cannot watch you yube need help

    why i cannot update my new apple tv 3g and i cannot watch you yube, need help.

    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.

  • I downloaded Gatsby film to watch it from tv apple and put on English subtitles on for us as deaf people and it won't come up subtitles. Any reason why?

    Any reason why it won't come up English subtitles for Gatsby film? We are deaf and relies
    on subtitles

    Welcome to the Apple community.
    Have you confirmed that the movie has subtitles.

  • HT1660 Bought Dexter on i tunes but can only watch about 30 secs before it stops working. Can't even view my library, and apple support won't help me because I don't have a serial #.  This is maybe why I don't buy apple products!

    Why does apple suck so much?

    Why ask such a rediculous question?
    Apple does not suck.
    Contact itunes support.
    http://www.apple.com/support/contact/
    You do NOT need a serial number.  Not sure why you think that you do.
    You apparently are making a judgement based on your incorrect assumptions.

  • Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it acr

    Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it across all the places around to pay their attention. This is a desperate move, so if you are not the right people to help me to get my message accross, may be you can advise where can I go.
    Thank you, and sorry for the language.
    Vitas Dijokas
    I am sorry to say that, but your security makes my life miserable – it’s been 2 months since my Apple ID account got stuck, and since then I cannot update 37 applications (to date), i.e. most of my applications. Half of them I bought. I also paid for iCloud, and it is not working. I paid money and I am stuck with old applications and no iCloud. Your security *****. Your service ***** too. It took your service 1 month to finally understand why this happened to me, and it took me tens of emails to you and 3 hours of telephone conversation to find out the reason for my problem. And the problem is still not fixed. NOT FIXED. You just leave your customer – the one who paid you money and spent so much time with you trying to help you help me – and nothing. You tell me:  “Vitas, Stick your stinky iphone in your *** and enjoy life, we do not care!” *************.
    It is ******* outrageous, and you should know that,  guys. Get into the ******* database and correct the bug. Get someone in the partners-telephone carriers company (it is Orange as carreer and Cellcom as seller of the phone)  authorized to Identify me in personal encounter in one of the branches in Israel (where I live) and make sure it is really me, and get the ******* system accept my password and let me use my phone.
    Otherwise **** off. None of my friends will get my advise to buy an iphone or any of apple products. And I think you should be very attentive to cases like this, guys. Do your work for the money we pay, or disappear. There are many others eager to take your place, and if the problem is not fixed I will eventually go to the others. My patience is lost, and as soon as I can afford another phone I will change it. AND I WILL TRY TO GIVE BAAAAAD PUBLICITY TO APPLE – I am threatening here, so ACT NOW.
    Vitas Dijokas

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

  • Angry with Creative Tech Support!!! Battery fried and they won't help!

    I am seething with anger right now over the awful Tech support I just received from Creative's Tech support phone line. I called to find out how I can get my almost new less than 2yrs old Creative Zen Sleek Photo 20gb MP3 players battery replaced. I am sure that my brand new Toyota Prius mp3 AUX jack fried the batter in my player. I have owned this for less than 2 years, and I hardly ever used this player. I always kept it charged fully and rarely played it.
    I have kept my player plugged into the AUX jack in my new Prius for the past 3 weeks, I went to turn it on yesterday and the battery was dead, it would not power up, so I just thought I forgot and left it on in the car and the battery just needed to be charged. I charged it up from 5pm last night to 6am this morning and it still showed it was charging, but no progress was being made on it. I unplugged it and tried to power on, nothing,, dead,, so I plugged it back into the charger and powered it on, it came one and started playing, then I left it on and unplugged it from the charger and within 20 seconds it gave me the warning that the battery was low and it was shutting down. The battery bar was completely white and showed that it was not charged at all from all those hours of charging, it usually charges full within 4 hours, it had been plugged in for 3 hours with it not being charged at all, yet it showed that it was charging..
    So, I know the battery is now fried, and I am sure the Prius AUX jack killed the battery, I have already heard of one other person this happening to on a Prius message board.
    So, I called up Creative this morning to just ask them how much to put in a new internal battery and fix it, they won't do it because it is out of warranty,, I told them I know it is out of warranty, but I am willing to pay? them to fix it, they told me that don't do? that, and I then asked very nicely and calmly to please direct me in how I can get it fixed, silence,,, from the agent,, she did not know what to say, basically she kept telling me I would just have to buy a new one.. I repeatly asked her to please tell me if the internal battery is replaceable by "SOMEBODY", I know Creative will not repair it, but you cannot tell me that this player is garbage now and nobody can fix it just because Creative refuses to do so.
    I then asked her how they can make a $250 product that cannot be repaired once it is out of warranty. I asked her what kind of company makes products that are not fixable?, This does not make any sense at all. once again, silence from her.. I kept? repeating that I just want to know if the battery can be replaced by somebody and how to go about finding out. She acted like it was a big secret. I said, Look, I know you won't fix it, but it has to be fixable by somebody... right,, or are you telling me that once the warranty is out, products just need to be thrown away in the garbage and replaced with a new one,, there is nothing else wrong with the player, the battery is just fried, that is all, as it still works when it is plugged in to the charger.
    You cannot tell me that a company like this makes internal batteries that are NOT fixable once they break, and the ONLY solution is just to buy a new product? This is insane, if this is the case I will NEVER buy another Creative product again..
    I have now called Toyota to see what they are going to do about this, but I'm not sure how I can proove that the AUX jack really did the damage. I know it did, but all I want to find out is how to get somebody to replace the internal battery.
    I have over 4,000 songs on this thing and I don't want to buy a new one and have to download them all again, this took me over 6 months to do this...
    Does anybody have any suggestions, I really truly disappointed in Creative and how they operate. I asked to speak to a supervisor and she wanted to pass me along to another Agent, I said NO, I want your name and the supervisors name and I am now waiting for a call back within 48 hours they told me.

    HI, Thanks for the websites, I did find some yesterday,, Be assured that if your player is out of warranty Creative will not repair it for you even if you tell them that you will pay for the repair. They just don't care, they want people to just buy a new one and they will refuse to tell you that there are places out there that will fix it for you. It is like some big secret I guess and their customer service reps in the Tech dept. will NOT tell you this. To me, this is such a deception and the most awful customer service in my opinion. I can guarantee that I will never buy another creative product again if? this is how they deal with customers that have purchased their products.
    I was not blaming them for the battery not working or anything just wanted their help in finding out how I can get it fixed. Crap happens and things break, but if Creative truly has the opinion that they will refuse to talk to you after the warranty has run out, this is totally appalling. I actually had to lie when I called and I had to hit the button that said that my player was less than 6 months old. Because there was NO way for me to talk to a li've person or get any questions answered by them if the player was out of warranty. They direct you to the website help, but that site is NOT working, and I still get a message today telling me that some "Kana" help website is currently not responding. This has been doing this since yesterday.
    So, right off the bat you are already shown that Creative could care less about their products after the warranty runs out.
    Oh, and I never said in my post that I did not have my music backed up on CD's or on the Computer, I merely said that I did not feel like downloading all 4,000 songs again onto a new player, that takes time. I have over 25,000 songs, almost my entire CD collection on my computer and it does take time to go over all those again and pick the ones I would want on a new player. All of my music is backed up, that does not mean though that it is not a pain in the butt to transfer them all to?a new player. I certainly will not buy another Creative product, so I would in essence have to start all over again and pick out the ones I want on a new player.
    I'm in the process now of finding one of those repair places on the web to fix it, but I will never buy another product from Creative again

  • Adobe won't help fix problem caused by them

    I bought the software license of photoshop elements 13 and premiere elements 13 and needed help to install them which I received from Adobe. 
    However they won't open without an internet connection which is incorrect.  I live chatted this afternoon with someone from Adobe but because I had installed them onto a separate drive I have connected to my computer Adobe won't help me.
    Can anyone help me please?  I'm really upset about this and don't know what to do next.
    Thanks
    Robyn

    Hi,
    When you first use the editor, you must sign in to your Adobe Id and also supply the serial number that you got when you bought the products - there will be two, one for each product.
    If they are accepted then that has "activated" that copy - which means that you have registered that product/system with Adobe and that you can now start using it. You are allowed two active copies so you could have them on a desktop and a laptop.
    Once you have activated a copy, you should be able to work without an Internet connection unless you want to use a facility that requires it. Some of the special content have to be downloaded the first time that you use them.
    Once you have "activated" the product, do not sign out ar that will de-activate it and you will not be able to use it until you activate it again.
    The activation is Adobe's way of ensuring that people buy legitimate copies of the software.
    Hope that clarifies things
    Brian

  • When loading the program, the loading, circular icon will not stop. It seems like it is trying to load and can't.  Since Adobe tech support won't help with version 13, I need your help.

    I just bought this and was trying to load it for the first time and the circular icon just keeps flashing like it is trying to load and can't.  Most elements come up but I am wondering why it is still flashing like it is trying to load.
    At times, the drop down menus will not stay up.  When I click on them, they flash and then disappear.
    This is not a blank message.

    Not the help you're looking for -- sorry -- but I'm fighting a battle with Adobe tech support, too.  They won't help me with an issue involving using the program, but their site seems to indicate that tech support is available for download, install, & setup.  Check page: https://helpx.adobe.com/contact/what-contact-options.html and try calling them again.  Good luck!

Maybe you are looking for

  • Superscripting in dynamic text: is it possible?

    I'm hoping this is a quick fix! I need to dynamically load a string containing an expression with superscripted numbers. Can i do this?

  • What is the best way to change to color of the first word in a paragraph?

    I have a lot of paragraphs where I want the first word to keep the same font, size, type - but I want to change just the color of the lettering.

  • Spilled lemonade on my macbook keyboard..how do I clean it?

    The child I babysit for spilled quite a bit of watered down lemonade on my macbook pro keyboard. Can I take the keys off and clean underneath?

  • Search engine indexing

    I have built a website that the home page is 3 flash movies. I have added plenty of meta tags with description, keywords, etc. to the html file that they contains the swf files. Is this enough to get the site listed and indexed after I submit it? I w

  • Upgrading to FCP

    I am asking on behalf of a business customer who purchased the license for FCP about 6 months ago. They are just now trying to install the upgrade, but have lost their previous versions of FCP. Here is a copy of their email: We have a same issue with