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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:04:34+00:00 2026-05-22T18:04:34+00:00

I have a java Box in which are various components. When the user performs

  • 0

I have a java Box in which are various components. When the user performs an action, I want to empty the box, put a different set of components in it and then represent the box to the user. The box is part of a JDialog box. I am able to empty the box and repopulate it, but the display does not reflect the new contents. It is simply a blank display (I assume reflecting the fact that I emptied the contents of the box). I repaint the box after I put the new contents in but the display is blank in the area where the box is. Oddly enough, if I first add a line border to the box, then repaint it, the contents of the Box appear on the screen. This is most bizarre behavior. Any ideas why this is happening and how to get around this problem?

Thanks,

Elliott

  • 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-22T18:04:35+00:00Added an answer on May 22, 2026 at 6:04 pm

    Are you adding and removing the contents from the EDT? if this is occuring on the wrong thread weird repaint behavior can result.

    Also might want to try

    dialog.revalidate() 
    

    if the above is not the issue instead of calling repaint

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

Sidebar

Related Questions

I have a dummy Java Program, which I want to write in Clojure. It
I have a dialog box that the user inserts various data through gui controls,
I have java script code to set some of the properties of ajax controls.
I have Java Map (out of Strings and Ints) objects that I want to
I want to have java script clicking a link on the page..I found something
I have one Mediator.java which do all the functions. And there is RecordGenerationJPanel.java to
Preface: I am horrible with java, and worse with java ui components. I have
I have a rather strange question: I have a Java application which uses applications
currently, I am looking for a multi columns comb box components which can place
I have got a html web page which gets a user input in the

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.