问题
I was wondering is it possible to add a window to another window? Like can you add that window, like an internal frame to another window. The reason why I am asking this is because I want the image window (which is produced by ImageJ) to be displayed in a desktop frame or window. Also how would you go about doing this. Thanks in advance.
回答1:
You can call the getContentPane() method of a JFrame
, or more generally the getComponents() method of Container
(e.g., in the case of java.awt.Frame
or java.awt.Dialog
windows) and then set it as the content pane of a JInternalFrame
.
来源:https://stackoverflow.com/questions/23638291/adding-a-window-to-another-window-internally