Can anyone help me with the difference between pauseAWT() and awtSleep()? Also when to use one over other?
Can anyone help me with the difference between pauseAWT() and awtSleep()? Also when to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
junit.extensions.jfcunit.JFCTestCasein the AWT testing stuff of JUnit? I think the Javadocs are pretty clear:pauseAWT: Pause the awt event queue until it is released byreleaseAWT()or the end of the test is reached.awtSleep: w/o argument: Suspends the test for up to a maximum period of time, and allows the AWT Thread to resume temporarily / w/ argument: Suspends the test for up to the specified (maximum) period of time, and allows the AWT Thread to resume temporarily.So, the first pauses the AWT thread, the second pauses the test and allows the AWT thread to resume. Bear in mind that AWT operates in a separate thread, commonly called the EDT (Event Dispatch Thread). It looks like you would use these two methods in tandem to ensure a replicable state for testing.