Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
  1. #21
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Swing works by listeners responding to events. The event you are interested in is a mouse being located above a component, right? So you'll need to add a MouseListener to that component and write code that gets called when the mouseEntered and mouseExited events occur. Please read the Swing tutorials on writing a MouseListener -- it's all there.

  2. #22
    dyelax is offline Member
    Join Date
    Oct 2010
    Posts
    41
    Rep Power
    0

    Default

    id rather not rewrite the whole program in swing at this point, mostly because i dont know it at all. I do have mouse listener methods in my code, you can see them at the very bottom of my SSCCE. I have changed the paint() and mouseMoved() methods of my SSCCE (and added two arrays) to show what I am trying to do.

  3. #23
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by dyelax View Post
    id rather not rewrite the whole program in swing at this point, mostly because i dont know it at all.
    You don't need to re-write it as AWT uses the same MouseListener.

  4. #24
    dyelax is offline Member
    Join Date
    Oct 2010
    Posts
    41
    Rep Power
    0

    Default

    ive already put in a mouselistener. look at the first post.

  5. #25
    dyelax is offline Member
    Join Date
    Oct 2010
    Posts
    41
    Rep Power
    0

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Image File Location
    By shadowfax57 in forum New To Java
    Replies: 2
    Last Post: 08-19-2010, 08:54 PM
  2. Replies: 0
    Last Post: 11-07-2009, 07:45 AM
  3. Applet-Image,audioclip problem-pls help
    By samares in forum Java Applets
    Replies: 1
    Last Post: 02-21-2009, 04:23 AM
  4. problem getting the image(APPLET)
    By kof20012 in forum Java Applets
    Replies: 10
    Last Post: 09-11-2008, 07:22 PM
  5. Applet Image location
    By MarkWilson in forum NetBeans
    Replies: 3
    Last Post: 06-30-2008, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •