i would like to ask how to make 60 sec countdown with Timer starting when first moving the mouse (and display it in the title). Then at the end i would like to display some jOptionPane.Message or something. Here's the code...
private void jPanel2MouseMoved(java.awt.event.MouseEvent evt) {
jPanel1.setBounds(evt.getX(), evt.getY(), jPanel1.getWidth(), jPanel1.getHeight());
int a = KEK.nextInt(jPanel2.getWidth()-15);
int b = KEK.nextInt(jPanel2.getHeight()-15);
if(jPanel1.getBounds().intersects(jPanel3.getBounds()) == true){
rurin++;
jPanel3.setBounds(a, b, jPanel3.getWidth(), jPanel3.getHeight());
this.setTitle("Number of red dots touched: " +rurin+" ");
}
}