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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:48:51+00:00 2026-06-04T15:48:51+00:00

I had build big application for my client in Android. The new project is

  • 0

I had build big application for my client in Android.
The new project is to build the same app for PC in Java. So i have started developing with use of swing.
When building in Android i use classes with activities that had content views and i could switch between activities.
In java i have build multiple classes that extends JFrame and i wish to switch between them.
What is the right way to to this?

is this:

new_class.setVisible(true);
old_class.setVisible(false);

the correct way?

  • 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-06-04T15:48:52+00:00Added an answer on June 4, 2026 at 3:48 pm

    The general approach using Swing would be to either combine all the GUI elements ‘screens’ in one top level container using the appropriate strategy (generally a CardLayout, but the devil is in the details). This GUI shows some other options (JSplitPane & nested layouts):

    See also this answer for many other alternatives.


    For any other functionality which would logically be in a different container, use a (possibly) modal dialog or a JOptionPane. E.G. a log-in, popped from the main frame:


    Another thing to take into account is that Swing (with a desktop monitor) allows us to offer a richer set of components to the user. For instance, surfing around the Android SD card file system would generally be achieved by using one list per directory, and either changing the content of the list or view on entering a new directory. In Swing you might use a single JTree for that. So there is much less need for ‘different screens’ in a desktop GUI toolkit, over one designed to be used on a tablet or phone.

    Here is a tree as used in a file browser.

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

Sidebar

Related Questions

I recently had to build an app which was pretty big (just under 180mb)
I had been asked to build crystal reports for an application, i used the
I have a web that I build with WebDeploymentProject. I thought I had build
In an ACM example, I had to build a big table for dynamic programming.
we have a big community website build in drupal, where the site has a
We have received a WSDL from our client that we use to communicate with
I have spent way to much time on this I had to build the
I am trying to use Aptana to build an IPhone web application. I've never
I have been developing a plain JSP/Servlet web application, which focuses mainly in collecting
I have a project that has, amongst other things, one web application (mvc) and

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.