• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applet help needed why wont it work???

 
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!!!
 
Sheriff
Posts: 9099
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");
}
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic