I have a basic question to try to understand the getContentPane() method...
First, if I create a method to add components to my outer frame:
I am of the understanding that I call it using (in a UserInterface class which implements Runnable)
But it seems to work just fine if I just use (without the .getContentPane())....
I did read Oracle on it, and they indicate that you don't get all the benefits of the ContentPane (class) unless you use the method and will only get the default layout, etc. in a JFrame.... I think I see that, though if I don't change the layout of the JFrame, does it matter?
Second, I guess this question is separate, but I am asking both at same time because I think they are related enough to help understanding.. In that same createComponents above, now, to add the KeyListener, it gets added directly to the JFrame, NOT the component (frame.getContentPane()). Why now do we go directly the frame?