Game Development Reference
In-Depth Information
Figure 8-15
.
Use the Source
Insert Code
Generate
Getter and Setter menu sequence and select all
class variables
After you click on the
Generate
button at the bottom of the Generate Getters and
Setters dialog, you will see the 22 new methods, all shiny and new and coded for you
by NetBeans. The methods will look like the following:
public double
getvX()
{
return vX;
}
public void
setvX(double vX)
{
this.vX = vX;
}
public double
getvY()
{
return vY;
}
public void
setvY(double vY)
{
this.vY = vY;
}