Results 1 to 6 of 6

Thread: Need help with errors in simple code.

Threaded View

  1. #1

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    Need help with errors in simple code.

    Hey guys I am new to Java programming and I making a simple program to test out a java applett. I keep getting errors that say

    "C:\...\Test.java:14: <identifier> expected
    container.add(outputArea);
    ^
    C:\...\Test.java:17: <identifier> expected
    outputArea.setText("dfgdgdfg");"

    with my code, but I cannot figure out why. Can someone look at my code and see if they see anything obvious or not so obvious?

    Thanks!

    PHP Code:
    import java.awt.*;
    import javax.swing.*;



    public class 
    Test extends JApplet {



    JTextArea outputArea = new JTextArea();

    Container container  getContentPane();

    container.add(outputArea);

    outputArea.setText("dfgdgdfg");



    Last edited by Arc; Oct 23rd, 2005 at 06:47 PM.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width