Hi All,
Just started learning java GUI but am having a few issues.
I want to be able to add and remove components to my JPanels but each time i try and invoke remove() or removeAll i get a null pointer exception. I don't understand why because i made the jpanels global.
Infact the only function that works is getContentPane().removeAll().
but i dont want to have to add all the panels all over again just to display it slightly differently.
Another issue i have is i cannot call functions from my jpanels within nested methods. the compiler says " local variable ... is being accessed from within inner class must be declared final".
However i don't want to declare it final!
i am really stuck and i cant do anymore work until i sort this out.
Thanks for any help i'd really appriciate it
