Basic JInternalFrame problem

Hi, I have a JInternalFrame that has to pass an Objectto its parent JDesktopPane.

How can I send that Object to the JDesktopPane when the ActionListener in the JInternalFrame executes?

I have no problem getting the Object when I instantiate the JInternalFrame, but I don磘 know how to get it after that.

I磀 appreciate your help a lot. Thank you very much.

[379 byte] By [alberto_alvaradoa] at [2007-11-26 15:37:44]
# 1
> How can I send that Object to the JDesktopPane No idea what that means.
camickra at 2007-7-8 21:55:41 > top of Java-index,Desktop,Core GUI APIs...
# 2

I think I know what you're after:

call your JDesktopPane DesktopPane

, and your JInternalFrame InternalFrame

.

public class InternalFrame implements JInternalFrame{

private DesktopPane desktopPane;

public InternalFrame(DesktopPane dp){

super("name");

this.desktopPane = dp;

......... etc

when creating the JInternalFrame from the JDesktopPane,

InternalFrame internalFrame = new InternalFrame(this);

now providing you have a method in your deskop class that you can pass the object to, you can call something like

this.desktopPane.passObject(obj);

from anywhere in your JInternalFrame class.

AS

AberStudenta at 2007-7-8 21:55:41 > top of Java-index,Desktop,Core GUI APIs...