DrawPanel class

Posted on 2009-02-19
Last Modified: 2012-05-06
hi ,
 i just type a program from a book that has a line
 DrawPanel panel = new DrawPanel();

 Eclipse said errors. I import javax.swing.JFrame already. Please advise.
Question by:valleytech
    LVL 92

    Expert Comment

    whats the error

    use eclipse to resolve your imports
    Source>Organise imports

    LVL 86

    Expert Comment

    Can you post the exact error please?

    Author Comment

    error message: DrawPanel cannot resolve to a type

    Author Comment

    what should i import?
    LVL 92

    Accepted Solution

    tun Organize Imports from your eclipse source menu

    if that does not fix it then check that DrawPanel is in your build path and it is declared as a public class


    Author Comment

    i got it because after declare DrawPanel panel = new DrawPanel(); I  must create a DrawPanel class immediately :)
    Thanks a lot.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now