Question

Is it possible to set parent to JWindow after it was created? For example:

public class SomeJWindow extends JWindow {

  public SomeJWindow (JFrame parent) {
      //super(parent); - parent not set yet.
    }

}

and later set parent to SomeJWindow.

Was it helpful?

Solution

not it isn't possible, because

  • Top-Level Container is based on peer from Native OS, parent isn't possible to change, set after Top-Level Container is initialized

  • not possible to delegate, change parent from one Top-Level Container to another

  • I can't found any access to modify xxx$SharedOwnerFrame


  • Top-Level Container haven't implementer finalize() in API, then its life_cycle ended with current JVM

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top