D
Daniel Pitts
The JPanel constructor calls updateUI, which passes the "this"
reference to UIManager.getUI().
I thought that it was incorrect to allow your "this" reference to
escape your class during construction. Is this an oversight in the
implementation of JPanel, or did I misunderstand the assertion about
escape?
Is it only that you have to ensure that your "this" reference doesn't
escape the constructing thread? If that is true, then that means that
constructing a JPanel must be done on the EDT, to ensure proper
functioning. Am I missing something here?
reference to UIManager.getUI().
I thought that it was incorrect to allow your "this" reference to
escape your class during construction. Is this an oversight in the
implementation of JPanel, or did I misunderstand the assertion about
escape?
Is it only that you have to ensure that your "this" reference doesn't
escape the constructing thread? If that is true, then that means that
constructing a JPanel must be done on the EDT, to ensure proper
functioning. Am I missing something here?