Communication between two different JFrames?

后端 未结 4 2109
[愿得一人]
[愿得一人] 2020-12-06 07:54

Hello as maybe you have heard about GIMP or something like that which uses different frames As a complete gui so I was wondering how to do such frames communications when bo

4条回答
  •  长情又很酷
    2020-12-06 08:07

    If you are separating out your "Control" logic from your "View" logic in a MVC type pattern this should be as simple as just referencing a different component.

    Just like a JFrame might have multiple panels and your application can make changes to several panels based on actions in a single panel. Your application can have multiple frames that can be affected by actions in a single frame.

提交回复
热议问题