Event Handling - Timely JFileChooser
When I pressed a JButton to display a JFileChooser, it takes longer sometimes than others.
There is enough of a delay that it makes me question whether I pressed the button or not.
I changed the cursor to a wait cursor, which I release after creating the JFileChoser, however that has issues.
I was trying to give some feedback that the button was pressed and to please wait.
publicvoid actionPerformed(ActionEvent e)
{
if (e.getSource() == browserButton())
{
setBusyCursor();
JFileChooser chooser =new JFileChooser(....);
setDefaultCursor();
.....
// do whatever work with the selected directory/file....
}
}
Is there another workaround for this...
This works, but setting a busy cursor takes an EventQueue slot -- and perhaps, I'm not sure if, it also adds xx time to the JFileChooser appearing.
WIth that, the cursor seems to remain a busy cursor after the chooser appears -- until you move the mouse.

