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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:35:15+00:00 2026-05-25T06:35:15+00:00

I am making an autocomplete project(just like Google). I have a jtextfield in my

  • 0

I am making an autocomplete project(just like Google). I have a jtextfield in my frame and whenever I type something to that field, a JWindow will appear below the textfield and that window is coming from another class.

Now the problem is how could I make the window always appear below the textfield whenever I drag the frame?

Any help would be much appreciated.. Thanks…

  • 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-25T06:35:16+00:00Added an answer on May 25, 2026 at 6:35 am

    for manually set Location on the screen, you have to define something as private Point location; and getLocation from desired JComponent, don’t forget dealyed show for Show Top-Level Container into invokeLater();

    for example

    public void showWindow() {   
        window.setVisible(false);
        location = myTextField.getLocationOnScreen();
        int x = location.x;
        int y = location.y;
        window.setLocation(x - 20, y - 20);
        Runnable doRun = new Runnable() {
    
             @Override
             public void run() {
                 window.setVisible(true);
             }
        };
        SwingUtilities.invokeLater(doRun);
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I have an autocomplete field heere that is making an ajax request
I have a search field that I want to autocomplete with data that I
I am making a autocomplete Field that queries contacts by Display name and Email.
I have a jQuery autocomplete that works fine making the suggestions but when I
I am making a jQuery autocomplete and I have something between 10~20k registers. The
I am having making my edittext field autocomplete for contacts phone numbers. I know
I have a form here that I can get to autocomplete with hard-coded items
I have autocomplete, that simply calls $.ajax. And when its getting result, it tries
I have a jQuery autocomplete field with this code: var tags = [a, ab,
I'm making a token input style checkbox with an autocomplete (user types in something,

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.