Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advanced search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Devaka Cooray
Tim Cooke
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Saloon Keepers:
Piet Souris
Bartenders:
Forum:
Beginning Java
Not able to run code given on page 3 of head first java
Rahul Shandilya
Greenhorn
Posts: 1
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all,
Whenever i am trying to run below code in my System it is getting package.java.awt.events does not exist..
import java.awt.*; import java.awt.events.*; class Party { public void buildInvite() { Frame f = new Frame(); Label l = new Label("Party at Trim's"); Button b = new Button("You bet"); Button c= new Button("Shoot me"); Panel p = new Panel(); p.add(l); } }
Help me ....
Keith Lynn
Ranch Hand
Posts: 2412
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The package is java.awt.event
Amit Ghorpade
Bartender
Posts: 2856
10
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
HINT:
You should be checking the package name for any spelling mistakes.
SCJP, SCWCD.
|
Asking Good Questions
|
Campbell Ritchie
Marshal
Posts: 82459
594
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the Ranch
As far as I can remember the Party example from HFJ is incomplete and cannot be run as it stands. You probably mean you have a compiler error, whose cause has already been explained.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Getting the error "Exception in thread "main" java.lang.NoSuchMethodError: main" while trying to run
Help with First Java Code - Party.Java
beginner's question
Really simple answer probably...
noob needs help with path
More...