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