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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:12:21+00:00 2026-06-05T16:12:21+00:00

I do have a strange focus problem when using a JComboBox inside an embedded

  • 0

I do have a strange focus problem when using a JComboBox inside an embedded frame.

i created a new Shell like

shell = new Shell(display.getActiveShell(), SWT.SHELL_TRIM | SWT.APPLICATION_MODAL);

The shell i use to create an embedded frame like

    Composite contentComposite = new Composite(parent, SWT.EMBEDDED);
    contentComposite.setLayout(new FillLayout());

    frame = SWT_AWT.new_Frame(contentComposite);
    rootPanel = new Panel();
    rootPanel.setLayout(new BorderLayout());
    frame.add(rootPanel);

I added a JComboBox (with 2 elements) to the rootPanel.
When i select the ComboBox for opening the drop down menue, i can drag and drop the shell window, without losing the focus in the combo box.

The drop down menue is still in the same place on the screen, also when the shell window is moving to another screen area. The drop down menue is not shown below the combo box anymore.

i tried to add a focus listener to some of the components, but the focus is not lost on the combo box and not gained on the shell.

So how can i hide the popup of the combo box, when the shell is moved or gets the focus.

  • 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-05T16:12:23+00:00Added an answer on June 5, 2026 at 4:12 pm

    After Andrew Thompson described in his comment, that 3 different UI libraries are not the best choice, i started to try the AWT Choice class.

    These class is losing the focus, when the shell window is selected.

    So it seems, that swing can not be used so easily in embedded AWT objects, but the reason i dont see yet.

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

Sidebar

Related Questions

I have strange problem with receiving data from socket. On client im using air
I have a strange problem with lxml when using the deployed version of my
I am experiencing a strange problem: I have a Screen that is using the
i have a strange problem only in Chrome using an iframe but working in
i have strange problem doing reporting: i have numerous clients with different issued invoices.
I have a strange problem that is only happening in a single location. I
I have a strange problem with some documents on my webpage. My data is
We have a strange problem when implementing sessions with ColdFusion in IE6. After login
we have strange problem, we have single signon and we are trying to fetch
I have strange peoblems with sending-receiving sms messages in Android. I am using standart

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.