RePaint() bug or doing something wrong?

Im writing an application which consist of a JFrame and two JPanels.
They are laid out with a BoxLayout.
The upper JPanel basiclly draws an image out.
The lower JPanel is listening for mousemotionevents from the upper JPanel. Whenever a mousemotion events occur I write the x,y - coords of the mouse out in the lower JPanel.
The lower JPanel's code look somthing like this:
public class LowerPanel extends JPanel implements MouseMotionListener{
UpperPanel.addMouseMotionListener(this);
public void mouseMoved(MouseEvent e){
updating x,y coords..
repaint();
public void paint(Graphics e){
     e.clearRect(10,10,100,50);
     e.drawString("Coordinates of mouse.... x,y=...");
Now to the problem.. when the program starts everything looks ok with two panels, the upper panel showing the image and the lower panel drawing the "default" coords of 0,0. As soon as I start moving the mouse inside the upper panel the image of the upper panel is drawn inside the lower Panel as well?! Except from that everything works as it should. The coords are updating when I move the mouse but.. with the upper panels image as background to it heh.. does anyone know what is causing this and how to fix it? Please :]

to make the problem more clear:
It seems like the lower Panel captures the upper Panel's output somehow and draws it out before drawing it's own content. (?!)
I really need help with this one.. no idea what im doing wrong. :[                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Is this a bug in ipod software or am i doing something wrong?

    I got my ipod video a few weeks ago and was excited to be able to carry all 7000+ songs around in one place.. but then i ran into this problem and i'm not sure if it's a bug or if i'm doing something wrong.
    let's say i have exactly one album by an artist.. and i also happen to have some singles from the artist, with no album set... (i prefer not to have albums set for songs i don't have the entire album for, to keep from having to sort through a truckload of albums i don't completely have).
    when i browse by artist, and i select the artist, only the songs in the album shows up, all the non-album labeled songs are not visible! the same thing happens when i choose by genre..
    in fact the only way to find those songs not bound to an album is to select them from the song list.. and having to scroll through 7000+ songs to find one really bites..
    curiously enough, if there is two or more albums, then i can find the songs without albums.. definately sounds like a bug to me.. the software for the ipod video is only at v1.0, maybe they'll fix this (hopefully other ipods don't have this problem, i have no way of knowing though).
    one work around i have tried is to set an empty album for the artist's song that has none, but i mean i don't want to do that for all my non-albumed songs because i'm interested in preserving the timestamp of songs (to know when i got them) and i can't reasonably search for songs that have exactly one album to just set those..

    when i go to Music > Artist > All, as you suggested, i see all the albums i have listed. doesn't really relate to my problem with artists with songs in one album, as well as song w/o album set, and the latter not showing up.
    but that reminds me, why is it when i go to the All section from a particular artist and they do have more than one album (or even no albums), the order of the songs is in the order they are in the albums.. if i wanted the order it is on albums, i would have selected that album for example.. it would be nice if the songs were in alphabetical order when you're NOT browsing by album, making a particular song easier to find (what if you have thirteen albums for example and u aren't sure which album a song is on, now you have to scroll through a seemingly random ordered list to find one song, alphabetical would be SOOOO helpful!)

  • Bug in shuffle? or am I doing something wrong?

    Hi,
    I have a number of 1-minute clips that each have a 3 second text name on them in track v2. I've decided I want to re-order some of the clips, and I'm having more trouble with it than expected.
    First I tried to attach the name to the audio and video clips using
    Modify->Link, but that does not seem to work for linking two video clips in the timeline together. (I also tried attaching the text to one of the audio tracks, but all that did was unlink the "real" video that went with the audio.)
    I decided it's not that hard to just select both video tracks for each move, I'll just shuffle them together. I can't get shuffle to work properly! It worked (sortof) once. I selected both video and audio tracks, dragged them to the new location, hit "Option", watched the pointer change, and released the mouse. The selection moved, but instead of rippling the change down, it left a gap. It did not overwrite the other item in the track as though I had not hit option.
    I can work around that I'll just be left with a gap as I move segments forward to where the correct sequence is.
    Now comes the problem: I can't even repeat that! It seems no matter what I do, I can't shuffle segments in the timeline, they will overwrite. I've tried moving just the V1 segment, with the intent of moving the text later, no luck; it overwrites! I make sure that the arrow changes when I press the option key, and it does, although sometimes it changes to the right arrow instead of the little bendy one. Either way it overwrites instead of inserting. I've tried cmd-x cmd-v to cut and paste, but again it overwrites.
    Is this a bug I've triggered? or am I doing something wrong? I've read through page 200-201, volume 2 of the manual fairly carefully and I think I'm doing it right.
    I am using FCP 5.0.4.
    Thanks,
    --Beth
    PS. Even if it did work correctly, I think I'd prefer to shuffle automatically, and overwrite by pressing the option key. Is there any way to set that in a preference?

    It always works for me. You cannot shuffle multiple clips. Well, if you do, it will leave a gap. Why? dunno.
    I believe if your video and audio are not linked (cmd-L and you can only link audio and video, not multiple video clips) they will be considered multiple clips.
    The "bendy" arrow is the one you want and it varies based on where in the track your pointer is. Lower - insert, upper (I think) leaves a gap. Also, I always press the option key after I've started moving, but before it settles, but I don't think that should affect your operation as long as you push option after you've started moving, but before you let go.
    As to changing the option behavior, I don't think there's a way...
    Patrick

  • IndentAndSpacingFormat - Bug in API or am I doing something wrong?

    I have a FieldObject in my report with double line spacing (LineSpacing=2) and then try following code to see its spacing format:
    double lineSpacing = myFieldObject.FieldFormat.StringFormat.IndentAndSpacingFormat.LineSpacing;
    Unfortunately this returns 1 instead of 2! It always returns 1, no matter which field object I try it for. Am I doing something wrong?
    Thanks in advance...

    Hi John,
    I've duplicated the issue. It seems to be a problem only when the field type is defined as Memo in CR Designer. If the field is a String type then it returns the correct value.
    I'll have to escalate this to R&D to fix. It will take 2 or more months depending on their load or more.
    Verified indents do not return the correct value also. Likely related to the field type.
    Thank you
    Don
    Edited by: Don Williams on Jan 29, 2009 2:17 PM
    Edited by: Don Williams on Jan 29, 2009 2:46 PM

  • Presets - am I doing something wrong?

    Wonder if someone can quickly tell me what I'm doing wrong here.
    I'm trying to add a preset which I can drop onto other clips quickly and easily.
    I take a clip and apply the effect I want to it. I then choose that effect in the Effects Control Window and try and "Save Preset" but it is greyed out. Am I missing an obvious step here?????

    Hi Tom - thanks for your reply - however, I think you've just verified that it simply isn't working for me as that is exactly what I have done. I noticed it was greyed out and thought I would do all the changes in the Effects Control panel itself but even when I create it from scratch in there or change an already created effect then it still stays greyed out for me. It is the Time Remapping I'm trying to do here as well.
    The problem with the Copy and Paste attribute is that doesn't work properly either!!!! I've created a 50% speed remap - but when I copy it and paste attribute - although it says it's 50% it clearly isn't and sometimes is only about 10% longer than the original clip. It appears to be another bug in the software although I was hoping I was doing something wrong!!
    Thanks for your reply anyway though.

  • Security risk? or am i doing something wrong?

    hello all,
    i administer a snow leopard server machine to serve out files via AFP to a small company. i think i may have either discovered a security bug, or if i'm doing something wrong, if someone would be kind enough to help, i'd greatly appreciate it. here's what happening (with criticial info changed obviously):
    let's say the server has two users that login to access files, userA and userB.
    userA's password to login is boat and userB's password is train.
    either userA or userB can successfully login and gain access whether they use boat or train as their password.
    i only discovered this as userB's password is the same as userA's old password on a Tiger server we had years ago, and userA was able to successfully log in with this old password that should have been rejected. i then did a test to see if the other way work, and lo and behold yes, that's when i found out that any user can log in successfully so long as ANY user's password was being used.
    i haven't been able to test various OS flavors, but all of our client boxes run Leopard, while the server is Snow 10.6.3.
    am i doing something wrong in my user set ups? it doesn't seem like this would be an intended feature. thanks to anyone that can help.
    j

    That certainly doesn't sound right, but it's such a fundamental part of file sharing that it needs further investigation.
    First thing to check is whether guest logins are available, and whether you're actually logging in as a guest rather than a registered user when the incorrect password is used.
    The server's logs (or Server Admin) should be able to confirm this.
    While I might expect an incorrect password to reject the login, if you have guest access you're essentially saying you don't care about authentication anyway, so it might be the issue.
    The second thing to check is whether the same happens on other forms of login to the server, e.g. ssh, SMB, etc.
    That will help identify whether the problem relates to AFP or something more global on the server (e.g. there may be a local account for userA and userB that's being used rather than the Open Directory account you expect.

  • I cannot change from grid view to list view when i contol click on the downloads folder on the dock am i doing something wrong? if so how do i change the ?view in the dock

    when i contol click on the downloads icon in the dock i get the gris view . I thought if you control click, you are able to change the view to fan or list. am I doing something wrong.? Icheck to make sure the contol key is working by doing a screenshot and it works there. What am I doing wrong?

    Needs to be a Stack ?

  • I have added photos to My Photo Stream on my PC (Windows 7). They appear in the Uploads folder instead. They do not upload to iCloud. Am I doing something wrong?

    I have added photos to My Photo Stream on my PC (Windows 7). They appear in the Uploads folder instead. They do not upload to iCloud. Am I doing something wrong?

    Unfortunately, photo stream on a PC is iffy at best.  Many people have problems getting it to work properly, including myself.  A work around would be to use an app like PhotoSync on your PC, which can send photos wirelessly to the camera roll on any of your iOS devices on the same wifi network.  Once in the camera roll, you iOS device will be added to your photo stream.

  • Iphone 4s wont sync when I connect it to the pc( not apple). It is connected as it comes up on itunes but when I try to sync it with apps/ music etc it wont. I am doing something wrong or is it a mistake with the phone.

    My iphone 4s wont sync when I connect it to the pc( not apple). It is connected as it comes up on itunes but when I try to sync it with apps/ music etc it wont. I am doing something wrong or is it a mistake with the phone. I am still able to download apps and music from itunes on my phone though.
    I already restored it but that didn't help.
    TIA for any replies.

    iPod touches or any iDevices from Apple sync only to one computer. If you sync to a different computer, all your music will be replace with the music from the new computer's iTunes. If the music were purchased from iTunes, you can re-download them again otherwise the music on iPod touch will be deleted. Do you have iTunes backup? 

  • I have backed up my old phone to itunes, however, when I try to restore data to new phone it is saying the password is incorrect but I can get into my itunes account with my password so I am doing something wrong?

    I have backed up my old phone to itunes, however, when I try to restore data to my new phone it is saying the password is incorrect but I can get into my itunes account with my password so I am doing something wrong?

    I'm having this EXACT same problem with my iPhone 4, and I have the same computer stats (I have a Samsung Series 7)

  • I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what....

    I have a Windows 8.1 and it's even running slow.  I'm a complete novice with computers (I've only had this one for 3 weeks) and I'm probably doing something wrong, but I haven't a clue what.
    The tools are not responding when I try to use them.  Some of them work sometimes, but not others and some don't work at all.  I'm in a design class online and I need these tools desperately.  I have an assignment due Monday and I'm losing the whole weekend because Tech Support is only open M-F!
    Any help anyone can give me will be appreciated.
    Thanks,
    Rose Ireland

    Maybe these links provide some pertinent information.
    Optimize performance | Photoshop CS4, CS5, CS6, CC
    Photoshop: Basic Troubleshooting steps to fix most issues

  • HELP! Downloaded LR5 and when open it shows an error message saying error while trying to change from modules and I can not even import photos. Am I doing something wrong?

    HELP! Downloaded LR5 and when open it shows an error message saying error while trying to change from modules and I can not even import photos. Am I doing something wrong?

    I have the same problem, and the solutions in   Error changing modules | Lightroom do not work.  Even uninstalling and reinstalling a new copy did not solve the problem.  As anyone got an idea what other lingering files might be causing the problem?

  • After creating a new slideshow I export it with the  setting HD 1080p it is then saved as a .mov i then create a dvd in idvd and the quality is not  as good as the original photo's when viewed on the monitor or a TV, am i doing something wrong?

    After creating a new slideshow I export it with the  setting HD 1080p it is then saved as a .mov i then create a dvd in idvd and the quality is not  as good as the original photo's when viewed on the monitor or a TV, am i doing something wrong?

    DVD's are only 640 x 480 (interlaced), so yes, the quality is not nearly as good.  You should probably create your .mov in DV format to best match the DVD format

  • I just purchased Adobe Acrobat in order to convert a pdf to an excel program but it appears that it will only convert to Word, not excel? Am I doing something wrong or should I cancel my subscription?

    I just purchased Adobe Acrobat in order to convert a pdf to an excel program but it appears that it will only convert to Word, not excel? Am I doing something wrong or should I cancel my subscription?

    What happens when you convert to excel?

  • Using the crop tool in Lightroom 5 I can only move and crop my photos from the top. Am I doing something wrong?

    I am new to Lightroom 5 and find I cannot crop my photos as easily as I did in iPhoto. I would like to be able to drag them if I choose a custom size or crop them from the bottom as well as from the top but my two sided arrow disappears when I work at the bottom of the photo. Am I doing something wrong?

    I would suggest you trash the prefs.
    Quit Lightroom
    Launch Finder and find the user Library by clicking the Go menu whilst holding down the Optn (alt) key (n.b. the library is hidden until you press the optn key) and inside the Library folder select the preferences folder. Then trash the following file:
    com.adobe.Lightroom5.plist
    Then re-launch Lightroom
    It’s then worth clearing each cache. Go to the top menu bar:
    Lightroom >> Preferences >> File Handling (tab)
    Click the Purge Cache button under Camera Raw Cache Settings; then click the Purge Cache button under Video Cache Settings. Finally click OK.

Maybe you are looking for

  • Resolution keeps getting reset by sleep mode

    This is on an older Mac Mini. I bought my latest right before Yosimite came out. I tried Yosimite on the older Mac Mini to see if I liked it and so far I'm torn between Yosimite and Mavericks. I've been running Yosimite on this Mac Mini almost since

  • Need download link for Adobe Acrobat X pro for mac

    Need download link for Adobe Acrobat X pro for mac

  • Can't get to all the loops

    still same question as before

  • Airdrop - iPhone

    I tried to get my iPhone and Macbook Pro to share a picture using Airdrop. They do not see each other. Why is this?

  • What's SAPLRSMDATASTATE Doing??

    Hi, I'm not quite sure if this question should be posted here, but if not, please move it to where it should be. Thanks. I'm trying to access a BEx query from Microsoft Reporting Services through SOAP based XMLA. I'm using the basic authentication, i