• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

importing classes. error: illegal start of expression  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Apologies if this is a repeat. Netscape crashed. My program below
parses #s from a file (this part works fine) and then passes these #s to an imported graphics class (drawArc) to draw an arc.
I keep getting this error: streamtokenizer2.java:38: illegal start of expression public void paint (Graphics g)
I know I'm not setting this line up properly, but can't find detailed enough answers in Sun documentation or Black Book.
Tried moving the graphics chunk to different places and using different versions (drawArc vs. Arc2D.Double) Arc2D.Double class
works fine on its own. Any advice? Thanks!

[This message has been edited by Cindy Glass (edited September 28, 2001).]
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not embed your paint method inside your static main method and expect it to work. Try moving it out of there.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!