フレームの中にさらにフレームを追加(インターナルフレーム)

JDesktopPane desktop = new JDesktopPane();
JInternalFrame jf = new JInternalFrame();
jf.setSize(300,200);
imgframe.setLocation(10,10);
imgframe.setVisible(true);
desktop.add(imgframe);
getContentPane().add(desktop,BorderLayout.CENTER);

JInternalFrameにコンポーネントを追加する方法
JComponent c = (JComponent) jf.getContentPane();
c.add(new JButton(), BorderLayout.CENTER);
最終更新:2008年02月24日 18:06