Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4015994
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:41:11+00:00 2026-05-20T09:41:11+00:00

Hello as maybe you have heard about GIMP or something like that which uses

  • 0

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 both(maybe multiple) frames are loaded in memory and are visible.

I have gone through some articles but they were not so satisfactory, if anyone have a good example or tutorial then please share.

Regards
Alok sharma

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:41:11+00:00Added an answer on May 20, 2026 at 9:41 am

    Basically, it’s just a matter of having a reference to frame A in frame B, and a reference to frame B in frame A :

    public class FrameA extends JFrame {
        private FrameB frameB;
    
        public void setFrameB(FrameB frameB) {
            this.frameB = frameB;
        }
    
        public void foo() {
            // change things in this frame
            frameB.doSomethingBecauseFrameAHasChanged();
        }
    }
    
    public class FrameB extends JFrame {
        private FrameA frameA;
    
        public void setFrameA(FrameA frameA) {
            this.frameA = frameA;
        }
    
        public void bar() {
            // change things in this frame
            frameA.doSomethingBecauseFrameBHasChanged();
        }
    }
    
    public class Main {
        public static void main(String[] args) {
            FrameA frameA = new FrameA();
            FrameB frameB = new FrameB();
            frameA.setFrameB(frameB);
            frameB.setFrameA(frameA);
            // make both frames visible
        }
    }
    

    Most of the time, interfaces are introduced to decouple the frames (listeners, etc.), or a mediator is used in order to avoid too much linkings between all the frames, but you should get the idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello i have a problem that's maybe difficult to descripe, i have an application,
I have an NSString like @Hello World and want to convert that into an
Hello I have the following error by git-fsck, which cannot be cleaned by git-gc
Hello I am working with a simulator that uses rcS scripts to boot, this
Here's the story... I have a jQuery function that does something, this function is
Hello generous computerists! So I have a launchd plist item that is calling the
Hello all you helpful folks @ stackoverflow! Best resources for Java GUI's? Looking at
Hello we have an SQL server application running over a low bandwith connection. We
I have various length strings which are full of Base64 chars. Actualy they are
Alright, I'm confused as hell. I have an object that I store in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.