|
-
Sep 14th, 2004, 11:17 AM
#1
Thread Starter
Lively Member
error in code ...
The following code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class HelloBa {
HelloBa () {
JFrame f = new JFrame("Hello Ba ");
f.setSize(300,300);
f.getContentPane().add(this);
f.setVisible(true);
}
public void paintComponent(Graphics g) {
g.drawString("What up Ba!",125,90);
}
public static void main(String[] args) {
new HelloBa ();
}
}
gives me the error: "cannot resolve symbol method add (HelloBa)". Does anyone have a solution to this problem?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|