I’ve the follow code: http://aiids.pastebin.com/aLGYjraC
The problem is on line 84 it gives me a NullPointerException on programmaBesteller. When I debug, every private member (JMenu and JMenuItem) are null :s.
I don’t see the problem because I do new DefaultMenuBar()…
Here is some code which I think demonstrates the problem you are having:
The output is:
ie, the field
x, which is explicitly initialised and looks like it cannot benullis not actually initialised at the time of the superclass constructor. Hope that makes it clearer.