Posted By:
ARTURO_JOVELLANO
Posted On:
Thursday, December 20, 2001 02:19 AM
I have created an swing applet with the following swing components: 1) SplitPane i)Panel (top) ii)DesktopPane (bottom) 2) Popup Menu. 3) a Class extending JInternalFrame. When a menuitem is clicked in the popupmenu a method is called wherein it instantiates the class(#3) and add the class in the desktoppane. Below are some of the code snippets: --- private FrameEis FrameEis; 'the CLASS -- public void mouseClicked(MouseEvent e) { if (e.getSource()==ivjmnuFileEis) { getJDesktopPane1().add(getFrameEis()); } } ---- public FrameEis getFrameEis() { if (FrameEis == null) {
More>>
I have created an swing applet with the following swing components:
1) SplitPane
i)Panel (top)
ii)DesktopPane (bottom)
2) Popup Menu.
3) a Class extending JInternalFrame.
When a menuitem is clicked in the popupmenu a method is called wherein it instantiates the class(#3) and add the class in the desktoppane. Below are some of the code snippets:
---
private FrameEis FrameEis; 'the CLASS
--
public void mouseClicked(MouseEvent e)
{
if (e.getSource()==ivjmnuFileEis)
{
getJDesktopPane1().add(getFrameEis());
}
}
----
public FrameEis getFrameEis() {
if (FrameEis == null) {
try{
FrameEis = new applet.FrameEis();
FrameEis.setVisible(true);
}
catch (java.lang.Throwable ivjExc)
{handleException(ivjExc);}
}
return FrameEis;
}
<<Less