[nbj2ee] Lookup a topcomponent

  • From: "apiening" < >
  • To:
  • Subject: [nbj2ee] Lookup a topcomponent
  • Date: Thu, 29 Nov 2012 21:12:47 -0500

If I understand you right you want to get a handle to an existing 
TopComponent. Is that right?

Have you tried it this way?


Code:
TopComponent receivertopcomponent = 
WindowManager.getDefault().findTopComponent("ReceiverTopComponent");




Eric55 wrote:
> I'm missing something fundimental here.
> 
> I'm trying to loosely couple 2 modules, sender and receiver
> 
> In sender 
> private ReceiverTopComponent receivertopcomponent = new  
> ReceiverTopComponent ();
> 
> in constructor it calls
> associateLookup(Lookups.singleton(receivertopcomponent);
> 
> OnButtonPress it calls recievers setText Method.
> 
> In Reciver
> setText justs puts text in a textfield.
> 
> 
> This all works but the sender creates a new instance of receiver which is 
> bad.
> 
> 
> What am I missing?  How do I get sender to talk to the displayed instance 
> of receiver?







[nbj2ee] Lookup a topcomponent

Eric55 11/29/2012

[nbj2ee] Re: Lookup a topcomponent

Geertjan Wielenga 11/29/2012

[nbj2ee] Re: Lookup a topcomponent

John Yeary 11/29/2012

[nbj2ee] Lookup a topcomponent

apiening 11/30/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close