setCursor() not working in conjuction with SwingWorker
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rolita_Gordita
Posted On:   Thursday, January 31, 2002 10:02 AM

I have an applet that uses the MVC model. In this applet, I have sortable columns. When the user picks a column to sort, the handle to the applet and the column information is passed to a sort method in the data model which in turn fires off a class that extends SwingWorker to perform the sortation. (I have this in a SwingWorker class so that the applet will repaint if the user minimizes/maximizes the screen). When i attempt to set the cursor to the hourglass via the applet handle, the hourglass does not show up, even though when i dump the cursor name into a variable, it says it is a "WAIT_CURSOR". I see no related bugs in the java site. Has anyone else encountered this problem? Am I doing something Wrong? here is t   More>>

I have an applet that uses the MVC model. In this applet, I have sortable
columns. When the user picks a column to sort, the handle to the applet and the column information is passed to a sort method in the data model which in turn fires off a class that extends SwingWorker to perform the sortation. (I have this in a SwingWorker class so that the applet will repaint if the user minimizes/maximizes the screen). When i attempt to set the cursor to the hourglass via the applet handle, the hourglass does not show up, even though when i dump the cursor name into a variable, it says it is a "WAIT_CURSOR".

I see no related bugs in the java site. Has anyone else encountered this problem? Am I doing something Wrong?

here is the source:


public Object construct() {
jt.setHourglass();
System.out.println(jt.getCursor().getName());
jt.showStatus("Sorting");
jt.setEnabled(false);
if (sorter == null) {
sorter = new TableSorter(model);
}

try{

sorter.shearSort(model.getSortedColumn(), model.isIsAscent());
model.fireTableDataChanged();
}catch(Exception e){
System.out.println(e);
}
finally{
jt.showStatus("Sorting Complete");

jt.setEnabled(true);
}
return null;

}

   <<Less
About | Sitemap | Contact