I am having a simple application wherein a JFrame is having JPanel.I want to add an JInternalFrame within that JPanel.I would like to know whether is that possible? I have tried with JDesktopPane but the JDesktopPane and the JInternalFrame are not visible. Can anyone please help. Thank you.
The problem is that the JDesktopPane component does not have a preferred size... so when you add it to a JPanel (with default FlowLayout) it has size 0, and doesn't display. Either set BorderLayout on the JPanel and add the desktop to the center or call setPreferredSize() on the desktop.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
posted 16 years ago
Thank you very much Nathan. It worked. Thanks a lot. Mitesh