Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AWT ?  RSS feed

 
Willie Toma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code gives this error message:
"FrameDemo.java": Error #: 300 : class show not found in class FrameDemo at line 6, column 19

 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change
new FrameDemo.show();
to
FramDemo demo = new FrameDemo();
and add the show method to the end of the constructor.
 
Willie Toma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
I copied it directly from an example in a book.... But, it didn't work!
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Willie,
You didn't copy it exactly. You left off the parenthesis that make all the difference.
You are trying to create a new FrameDemo object and invoke a method of Frame (Superclass or FrameDemo).
Good: new FrameDemo().show();
What you did was try to create an inner class called show inside of FrameDemo.
Bad: new FrameDemo.show();
Notice the difference? (bold part)
Regards,
Manfred.
 
Willie Toma
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it..
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!