954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

small problem with my dialog request

I want to make an object move to a new height from the user request. My code below does not do that. Where am I going wrong.

thanks in advance.

/* instance variables */
private Aobject object;

public void moveObject ()
{
int number;
{
number = Integer.parseInt(Dialog.request("Enter new
height?"));
number = object.getHeight() + number; // what do I
// need to do here
}
}

Have I kept this thread organized?

ttboy04
Junior Poster in Training
53 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

If there's a getHeight() method then there's probably a setHeight(int h) as well.

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

getters & setters - cheers JamesCherrill

ttboy04
Junior Poster in Training
53 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You