It's not a secret anymore!
The moose likes Beginning Java and the fly likes Inner Classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner Classes" Watch "Inner Classes" New topic

Inner Classes

Reed Spool

Joined: Jan 11, 2006
Posts: 14
The following code is exactly coppied from the Head First Java book page 384, i need to do animation and things but i get an error about "expected "{"" near the bottom of the code, i'm pretty sure it has to do with the fact that i'm using an inner class, and not about the animation itself, any help is greatly appreciated in solving this mystery error

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Check line class MyDrawPanel extendsJPanel. Provide space after extends and it will work


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
I don't see any problem except that:

is missing a space.

Edit: I guess I'm late as usual.
[ August 27, 2006: Message edited by: Garrett Rowe ]

Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
joy peter

Joined: Aug 29, 2006
Posts: 13
I agree with Garett.

Awake Arise and Stop Not Till Your goal is reached
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15096

I agree with Naseem, Garrett and Joy.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Inner Classes
It's not a secret anymore!