This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem in getPosition and setPosition...... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem in getPosition and setPosition......" Watch "problem in getPosition and setPosition......" New topic
Author

problem in getPosition and setPosition......

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 979
    
    2
Cpoint.java



Main.java



code is working, my question is why and how we use getPosition() and setPosition(), however

System.out.println(this.getPosition()); this can be done using this also System.out.println(x);

and also is something wrong i m doing here to implement these two methods..?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in getPosition and setPosition......
 
Similar Threads
Java game loop problem with timimg
New to Java. Need some proformance suggestions
Calling an applet from another class of the same package
Problem in passing color as a parameter
Bouncing balls