Stan Dominski Guest
|
Posted: Tue Jun 28, 2005 3:34 pm Post subject: Incorrect source shown HELP ! |
|
|
In doing a simple applet I have an error message that says:
"DrawGrid.java": Package C:Documents and SettingsGateway
Userjbprojectstan_draw_gridteststan_draw_gridDrawGrid.java
stated in source unnamed package does not match directory
C:Documents and SettingsGateway Userjbprojectstan_draw_gridteststan_draw_gridDrawGrid.java.
This is rather strange because when I select the name
and directory of the new applet:
File
New Project
the path I give is C:2_jbprojectJP
so how does it get
C:Settings and DocumentsGateway Userjbproject
(Old directories that I don't use anymore ! )
How do I change the source to have the correct path ?
Thank you
Stan
------------------------------------
import java.applet.*;
import objectdraw.*;
public class DrawGrid extends WindowController
{
private Location verticalCorner;
private Location horizontalCorner;
public void begin()
{
horizontalCorner = new Location(0,0);
verticalCorner = new Location(0,0);
}
// FilledRect(Location origin,double width,double height,DrawingCancas c)
//Parameters:
//origin - the upper left corner of the bounding rectangle
//width - the width of the bounding rectangle
//height - the height of the bounding rectangle
// the canvas in which the image is created
public void onMouseClick(Location p)
{
new FilledRect(verticalCorner, 5,canvas.getHeight(),canvas);
new FilledRect(horizontalCorner, canvas.getHeight(),5,canvas);
// translate(double dx, double dy)
// Translate the point by the given increments.
//Parameters:
//dx - amount to move in x direction
//dy - amount to move in y direction
verticalCorner.translate(10,0);
horizontalCorner.translate(0,10);
}
}
|
|