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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:48:29+00:00 2026-05-28T01:48:29+00:00

So my situation is simple (IMHO): I am trying to create web-esque Java application

  • 0

So my situation is simple (IMHO):

I am trying to create web-esque Java application (it’s a sort of Point-Of-Sale application) that behaves much like a website, but is all in Java. Right now I have a semi-simple SWT application written in Eclipse and it displays a few options (sign in, price check, inventory check and employee timeclock). When any of these is pressed (or corresponding keyboard shortcuts are activated) a dialog box pops up prompting authentication. Assuming user is verified, I want the main application window to display a new set of functions (scan item, item lookup, etc.) seamlessly.

If this were HTML I would just make a new page, and if I were writing against the Android platform I would just create a new activity…but this is very new and I am having a very hard time finding any relevant information.

PS I’m not set on SWT if anybody thinks a different library/technology (such as Swing/AWT) is better.

  • 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-28T01:48:30+00:00Added an answer on May 28, 2026 at 1:48 am

    In SWT, if you want to replace the content of a Composite, you first need to dispose the existing controls, next you create the new controls, and finally call the layout(...) method on the Composite:

    // Retrieve existing composite
    Composite composite = [retrieve existing composite]
    
    // Remove exising children
    for (Control child : composite.getChildren()) {
         child.dispose();
    }
    
    // Create new children
    Label label = new Label(composite, SWT.NONE);
    
    // Layout
    // Maybe update the composite layout with composite.setLayout()
    composite.layout(true, true);
    

    Another solution is to use a Composite with a StackLayout if you want to display back and forth several predefined contents.

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

Sidebar

Related Questions

Situation: I have a simple XML document that contains image information. I need to
Here's the situation: I'm developing a simple application with the following structure: FormMain (startup
All, my situation is that I have the basic route, plus some other simple
The situation is simple. I have a datagrid that gets its data from a
Simple situation. I've created an application which uses SQL Server as database. I could
A very simple situation. I'm working on an application in Delphi 2007 which is
Simple situation. I'm trying to write my own blog with a minor twist. Part
Here's my situation: I've written a simple web browser. Tabbed browsing was easy enough
Very simple situation... very strange problem. I have a retained iVar NSMutableArray that I
Situation is simple. I'm starting to develop a website that should be localized based

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.