preventing WAIT_CURSOR clicks

Hello,

While processing certain data I want to prevent the user from clicking any buttons in the application.

I change the cursor to a WAIT_CURSOR, but I can still activate buttons, just like a regular cursor.

I'm pretty sure there's a very simple answer to this, but I couldn't find it sofar...

Thanks,

Kamo

[349 byte] By [lajosa] at [2007-11-27 5:17:38]
# 1

> Hello,

>

> While processing certain data I want to prevent the

> user from clicking any buttons in the application.

>

> I change the cursor to a WAIT_CURSOR, but I can still

> activate buttons, just like a regular cursor.

>

> I'm pretty sure there's a very simple answer to this,

> but I couldn't find it sofar...

>

> Thanks,

> Kamo

Google on glass pane

Kaj

kajbja at 2007-7-12 10:40:31 > top of Java-index,Java Essentials,Java Programming...
# 2
http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html
kajbja at 2007-7-12 10:40:31 > top of Java-index,Java Essentials,Java Programming...
# 3
Or (and didn't this come up just yesterday?) you could provide some morevisual feedback by having a modal dialog box appearing (perhaps with acancel button!). The modality will take care of locking up other windows,and it will give more feedback that a mere cursor.
Hippolytea at 2007-7-12 10:40:31 > top of Java-index,Java Essentials,Java Programming...
# 4

Thanks for pointing me to the glass pane. Exactly what I needed.

I can see the point about using a modal dialog, but it wouldn't work well for my application. I already have a status message and progress bar on the main app panel that give visual feedback for the task running.

Thanks,

Kamo

lajosa at 2007-7-12 10:40:31 > top of Java-index,Java Essentials,Java Programming...