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 1001435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:40:19+00:00 2026-05-16T07:40:19+00:00

I always coded console applications and learned some basic UML/patterns skills, using C++. Now

  • 0

I always coded console applications and learned some basic UML/patterns skills, using C++.

Now I decided to move to Java and add GUIs to my programs.

The first question is how to handle the GUI layer in the program desing. I mean, how I should separate all the GUI code (adding components, basic event handling) with the code that really does the job (say, when some button is pressed).

Another question its related about the EDT. I read that (almost) all Swing components must run in the same thread (usually the EDT) because of they’re not thread safe. So I thought that if “heavy code” it’s called from (for example) an ActionListener, then the GUI will become irresponsive for some time until that “heavy code” finish.

That’s pretty undesirable, so I think the natural solution is to run the heavy code maybe in another thread or do something like this (I know that this has to be done carefully because I couldn’t assume any more that after the user clicked a button, the “deep action” is done before handling another GUI event).

So as you see, I have plenty of questions about how to include GUI in my patterns to keep all quite independent and easy maintainable; and some questions about particular things of Swing components and responsiveness.

  • 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-16T07:40:20+00:00Added an answer on May 16, 2026 at 7:40 am

    Re separating business logic from GUI: If you intend to use Swing, first and foremost study the Model-View-Controller design pattern. It’s a good pattern for concern separation and Swing relies on it heavily.

    Re heavy-duty code and the EDT: Use SwingUtilities, or even better, SwingWorkers.

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

Sidebar

Related Questions

I have a C program which has always used hard coded define statements for
this code always return '0' i don't know why Dim cur_month = DatePart(DateInterval.Month, Now).ToString()
I have seen source codes always having a typedef for a structure and using
I am writing two console applications, a client and a server. I'm a little
I've written a simple Java Console Application in Eclipse that references a WCF web
I am using the SharePoint Object Model via a console app on the same
Does this code always evaluate to false? Both variables are two's complement signed ints.
Is the following always acceptable code? It seems to work, but does it consistently
This snippet of code always parses the date into the current timezone, and not
Why does this code always return 0? var possibleMatches = new Array(); $.getJSON('getInformation.php', function(data)

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.