im my java SE application i have a messagebox prompting asking the user to press OK. i want to make the user wait a certain time and the messagebox will automatically close in a certain time.

i read on swing.timer about this. but im bit confused with the implementation. how to do it to a messagebox.

can someone help me with a example code. pelase

Recommended Answers

All 4 Replies

On showing the messagebox, start a timer. When the timer runs out, dispose of the window.

can you please provide me a sample code. about the timer and the timer runs out

lich ... it's not that hard to write a countdown, even if you're not using a timer.

can you please provide me a sample code. about the timer and the timer runs out

There's lots of examples on the web. Why do you think someone should write a new one just for you? Google is your friend.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.