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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:35:32+00:00 2026-06-02T21:35:32+00:00

I wanted to make a memories or find pairs game for Java, just to

  • 0

I wanted to make a “memories” or “find pairs” game for Java, just to start with a basic game before starting something more difficult. My game works very well, but I just have 1 big problem. I don’t really know how to hide the 2 images x seconds after the user clicks on the second one.

This is what is done:

  1. The game is created with 4×4 buttons in a array
  2. The values of the cards are distributed (name, position, icon)
  3. The user then clicks on the first card, which shows up immediately
  4. The user clicks on the second one, if the first is equal to the second one then disable the 2, if not then re-hide the 2.

But I don’t know how I can make the program show the second card and then after x seconds hide the 2…

How can I solve this?

  • 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-02T21:35:33+00:00Added an answer on June 2, 2026 at 9:35 pm

    Depending on what framework you are using, there should be a timer utility available to you.

    For instance, if you are using Swing, then you should be able to use javax.swing.Timer as suggested in the above comments. Follow this link for a simple Swing Timer tutorial. As they say on that page, swing timers can be used in one of two ways and one of those ways is:

    To perform a task once, after a delay

    This sounds like exactly what you are trying to achieve.

    You could also try a library like Joda Time which has lots of features and options.

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

Sidebar

Related Questions

I wanted to make sure about something in Java: If I have a Character
I wanted to make Map of Collections in Java, so I can make something
Edit: Just wanted to make the question I have more clear. I pretty much
I wanted to make a basic custom keypad for the iPhone , I did
If I wanted to make an iPhone game like this one (ignoring the multiplayer
I wanted to make toggle buttons in my activity look something like the picture
I wanted to make a query with Rails, something like this: filters = Filter.joins(:category_filters).where(category_id
Basically if I wanted to make something a search page with paging I would
I wanted to make this script work somehow, but i find that after you
I wanted to make a web site with the following basic features- (1) User

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.