Suddenly there are a rash of questions on StackOverflow about this topic [1, 2, 3, 4, 5, 6, 7]. They have little to do with ImageJ specifically. They are all just questions about adapting a fundamentally SDI-based application (java.awt.Frame
) to an MDI-based one (javax.swing.JInternalFrame
).
Doing this is a huge endeavor, especially for a junior programmer. You will need to rewrite substantial portions of the ImageJ 1.x codebase, as it was never designed to work as anything other than a single SDI AWT-based UI.
You will need to be thoroughly familiar with Java Swing, particularly MDI and JInternalFrame; see the Java Tutorial on JInternalFrame to get started.
But that alone will not be enough. Unless you invest hundreds or even thousands of hours with an extremely careful design, and leverage advanced techniques such as Java bytecode manipulation, you will end up with something that is not backwards compatible with ImageJ 1.x, and hence does not work with the majority of its plugins. And no matter what you do, some plugins will not behave as you want, because they directly rely on the fact that ImageJ1's data structures are SDI AWT components by nature.
So before charging down this track, I want to ask: what do you really want to accomplish? Why are you doing this? What is the end goal? How will it help users?
If you seriously want to redesign ImageJ as an MDI application for some reason, then I would encourage you to check out ImageJ2. One of its primary goals is proper separation of concerns—i.e., keeping the data model logic isolated from the display logic—so that things like MDI user interfaces become possible. It has been in development now for over four years, and we do have a proof of concept MDI Swing user interface. But it is not very functional yet, and the UI framework itself still needs more iterations—these components are still very much in beta, and will be for at least another year. You are very welcome to get involved, and we are happy to answer specific technical questions about it, but it would be a very steep learning curve for anyone who is not already intimately familiar with Java Swing.
Much easier might be to find an alternative way to accomplish your goals here. I encourage you to write to the ImageJ mailing list describing your needs at a high level. Then we can offer some suggestions on ways forward.
Note: This answer was adapted from a reply I wrote to the ImageJ mailing list.