java JFrame problem,

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • coffeetime
    New Member
    • Mar 2008
    • 3

    java JFrame problem,

    Hi,
    I just decided to learn java, so I'm quite a noob.
    I use the book learning java third edition.
    have JDK 1.6
    program in notepad.
    I have made the simple HelloJava example, and now i wanted to make the one in the frame. but when i try to compile the .java file i get following error:

    C:\Program Files\Java\JDK1 .6.0_05\bin>jav ac HelloJava.java (the file is located in the bin map)
    HelloJava.java: 5: cannot find symbol
    symbol : class JFrame
    location: class HelloJava
    Jframe frame = new JFrame ("Hello, Java!")
    ^
    1 error

    and it doesn't compile
    here is the piece of code in de .java file

    [CODE=java]import javax.swing.*;

    public class HelloJava {
    public static void main(String[] args) {
    JFrama frame = new JFrame( "Hello, Java!" );
    JLabel label = new JLabel("Hello, Java!", JLabel.CENTER );
    frame.add( label );
    frame.setsize ( 300, 400 );
    frame.setVisibl e( true );
    }
    }[/CODE]

    I hope you can help this beginner out ty already
    Last edited by acoder; Mar 11 '08, 01:26 PM. Reason: Added code tags
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Hello coffee,

    Welcome to the Scripts, please take a moment to check out the POSING GUIDELINES .

    I think is question will have a better chance of getting answered in the Java Forum, so hopefully we can get a moderator to move your post.

    Welcome and good luck!

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Moved to the Java forum.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Read your other thread for an answer. You already asked
        this question in this forum.

        kind regards,

        Jos

        ps. I'm closing this thread.

        Comment

        Working...