AWT to Swing Question

I have been trying to convert an AWT app to Swing. I started trying to convert the entire app in one shot and had this same problem. Now I have been slowly adding Swing to the App currently only in the form of JPanels. I can get jpanels to work fine, but when I try to change a Button to a Jbutton

I get:

Exception in thread "main" java.lang.NullPointerException

at java.awt.Container.addImpl(Unknown Source)

at java.awt.Container.add(Unknown Source)

The line of code that it references is just an

add(myJbutton);

If I don't add the Jbutton everything works fine.

And if its a AWT button it works fine.

I figure this is something simple that I'm missing, Anyone know what up from this vague description.?

[768 byte] By [xavier33a] at [2007-10-2 20:22:34]
# 1
It looks like "myJbutton" contains the value null. At least, that's what I'd assume.My second thought would be that something significant about the JButton (label, image, preferred size, etc.) had been set to null.Any of this sound right at all?
tvynra at 2007-7-13 23:05:14 > top of Java-index,Desktop,Core GUI APIs...