0

I could not find it in any documentation, but as far as I found out experimental calling getAllFrames() returns all internal frames exactly in their z order.

Does anyone know if this observation is always true or can give any reference for it?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
ejoerns
  • 965
  • 2
  • 11
  • 22
  • 2
    the api is _the_ reference, nothing else. If it doesn't mention the sequence, then it's unspecified and may freely change across implementations/versions. Why do you want to know, what requirement do you want to satify based on your (accidental!) observation? – kleopatra Apr 15 '14 at 09:32

1 Answers1

1

Does anyone know if this observation is always true

I would say yes.

or can give any reference for it?

Look at the source code for the getAllFrames() method. It just iterates through all the components in the container. And since the components are always in ZOrder when you do this iteration the returned array will be in ZOrder.

camickr
  • 321,443
  • 19
  • 166
  • 288
  • 2
    Yes.. but if that is not mentioned in the Java Docs, another VM (or a different version of the same VM) might do it differently. AFAIU, if it is not explicitly stated in the docs., there is no guarantee. – Andrew Thompson Apr 15 '14 at 08:32
  • 1
    agree with @AndrewThompson everything that's not documented is an implemenation detail, may differ across different implementations and change without notice - don't rely on them in production code – kleopatra Apr 15 '14 at 09:29