Adam Chalkley wrote:How come I cannot use the add method to add f to b b.add(f) but b to f will work f.add(b) I know it's logical but how come it does not work when adding f to b it will not work
If you have TV and TV packaging. It is quite logical, that you can put TV into his packaging, but not other way round.
Adam Chalkley wrote:second question is how come I get a Java.illegal arquement exception adding a window to a container when I try too add a frame to a panel one.add(f);
Exception message is quite descriptive. Illegal argument.. Panel class extends Container class, so "add" method is inherited from Container and Component classes. There are about 5 overloaded "add" methods int Container class, and one in Component class. What kind of arguments each of these overloaded method accepts you should be able to find in Java API here (<- link).
Don't use import on demand, instead, use single type imports (line 1). About different import types you could find detailed information in JLS (<- link). It could be difficult to read at some point, but it is very detailed. That section about import statements is quite clear I think.
By the way, class names suppose to start with an upper case.