Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: error?

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default error?

    NOT ABLE TO DISPLAY MOUSE MOVE POSITION IN STATUS BAR
    //Adapter Class Demo
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;

    /*
    <applet code="adapterdemo" width=200 height=200>
    </applet>
    */

    public class adapterdemo extends Applet
    {

    public void init()
    {
    addMouseListener(new myadapter(this));
    }
    }

    class myadapter extends MouseAdapter
    {
    String msg="";
    public int x,y;
    adapterdemo adp;
    public myadapter(adapterdemo ad)
    {
    this.adp=adp;
    }

    public void mouseMoved(MouseEvent me)
    {
    /*x=me.getX();
    y=me.getY();
    msg="Mouse id clicked";
    repaint();*/
    adp.showStatus("Moving mous at" +me.getX() +","+me.getY());
    //paint();
    }
    }

    /*public void paint(Graphics g)
    {
    g.drawString(x,y);
    }

    }*/


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,514
    My Mood
    Grumpy
    Thanks
    0
    Thanked 165 Times in 156 Posts

    Default Re: error?

    Looks like you have all the code to paint/repaint commented out.
    Improving the world one idiot at a time!

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: error?

    Quote Originally Posted by Junky View Post
    Looks like you have all the code to paint/repaint commented out.
    you *****
    Last edited by copeg; November 13th, 2013 at 11:32 AM. Reason: Removed profanity

  4. #4
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,514
    My Mood
    Grumpy
    Thanks
    0
    Thanked 165 Times in 156 Posts

    Default Re: error?

    Are you swearing at me or your own stupidity?
    Improving the world one idiot at a time!

Similar Threads

  1. Problems with A* Map Search - GC Overload Error and Null Error
    By puneeth.meruva in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 18th, 2013, 03:01 PM
  2. Replies: 4
    Last Post: October 15th, 2013, 04:33 AM
  3. Please! Help me to this error "ERROR CANNOT FIND SYMBOL"
    By mharck in forum Object Oriented Programming
    Replies: 8
    Last Post: July 3rd, 2012, 09:20 AM