• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet help needed why wont it work???

 
Paul McCaffery
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code wont work and i cant figure out why
all it shows is this at
www.students.ncl.ac.uk/paul.mccaffery/sorting.html
All of the java lasses invloved are viewable too
www.students.ncl.ac.uk/paul.mccaffery/RectangleDemo.java
www.students.ncl.ac.uk/paul.mccaffery/RectangleArea.java
www.students.ncl.ac.uk/paul.mccaffery/Sort.java
www.students.ncl.ac.uk/paul.mccaffery/Mutex.java
www.students.ncl.ac.uk/paul.mccaffery/Element.java
www.students.ncl.ac.uk/paul.mccaffery/WindowUtilities.java
www.students.ncl.ac.uk/paul.mccaffery/ExitListener.java
Someone smart, could you please come to my rescue cause i am desparate it is only a simple little prob but even if i caould find the source of it i could fix it but cant find it. HELP!!!
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
all it shows is this at ...

And what is it supposed to show?
 
Paul McCaffery
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet with lots of rectangles on the screen being sorted in order of size
 
Paul McCaffery
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
having commented out this piece of code it seems to work but not rea din the file obviously It fails when trying to create the bufferedReader but dont knwo why cause the file is there and works on my home computer if i change the path name???

String file = "/pwp/tier-1/pwpstore3/21/mac2000/Insertion Sort.txt";
try
{
g.setColor(Color.black);
reader = new BufferedReader(new FileReader(file));
int y = 25;
int x = 525;
while((info = reader.readLine()) != null)
{
g.drawString(info,x,y);
y = y + 15;
}
}
catch(IOException exc)
{
System.out.println("Could not open FileReader");
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic