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

  • SEARCH
  • Home
  • 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 6652193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:06:22+00:00 2026-05-26T01:06:22+00:00

This method is supposed to merge two the definitions of two entries for a

  • 0

This method is supposed to merge two the definitions of two entries for a single in a glossary. It creates an instance of the GlossaryEntryMergeUI class (extension of JFrame), which walks the user through the merging process. The user clicks a button to submit and the window closes. The merge method extracts the merged definitions and returns the combined glossary entry.

What is the best way to make the merge method wait for response from the MergeUI? I tried using InvokeAndWait, but I couldn’t figure out how to make it work.

public GlossaryEntry merge(GlossaryEntry otherEntry){
    //First, merge the definitions
    GlossaryEntryMergeUI thisMerge = new GlossaryEntryMergeUI(this,otherEntry,mergeSignal);
    thisMerge.setVisible(true);
    thisMerge.setAlwaysOnTop(true);

    GlossaryEntry combined = new GlossaryEntry(word);
    combined.addDefinitions(thisMerge.getDefinitions());

    return combined;
}
  • 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-26T01:06:23+00:00Added an answer on May 26, 2026 at 1:06 am
    • consider to look for CardLayout instead of switch between two or more Windows

    • if is there Serializable or Observate, then better is wrap the code into invokeAndWait(), for simple switch between two Windows is there invokeLater()

    • I’d suggest not using two JFrames in same time, one JFrame and another Window would be JDialod or JWindow, because (for example if is there BackGroung Task) sometimes is so hard swith Focus from one JFrame to another, not to move JFrame toFront() …

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

Sidebar

Related Questions

This method is supposed to change the image being displayed on a JFrame gradually
This method works as expected - it creates a JTree with a root node
I have a controller method CreateOrUpdate, this method is supposed to save the car
I have this method that is supposed to read from a txt file and
This has got to be simple -- surely this method is supposed to work
I've this little method which is supposed to be thread safe. Everything works till
Original question: This method is supposed to change the image being displayed on a
I have this method that is supposed to take a screenshot and return the
I am observing strange behaviour of std::map::clear(). This method is supposed to call element's
I have this method which supposed to get a buffer and write some content

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.