简体   繁体   中英

How to to call JInternalFrame from another JInternalFrame?

it is posible ?? call JInternalFrame from another JInternalFrame ?? if so how?

i've looking for the answer over many hours.. found some question before..

in here How to manage a JInternalFrame calling another JInternalFrame?

I dont know that means getInstance? I think thts a container for a contentPane.. same as this question

is there any way call other JinternalFrame from an JinternalFrame but, in the desktopPane of of main Jframe.

both of that didnt give a right answer. the error always like this..

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

help me, I've spend my day for this sad question...

or for a another way it is posible blind/return a value to the main JFrame???

thanks u :)

This depends. If you only want to interact with the other JInternalFrame itself (and not a specific instance of the frame), you could use JDesktopPane#getAllFrames

If you need to execute a specific/custom method, you would actually be better passing a reference of the frame to the frame that wants to call it...

Or even better, develop some kind of model that can be modified and fire events, separating the logic from user interface

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM