Process progress bar resource usage grows over time, bug patch from András Schmidt ( rizsi )

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=1976854
This commit is contained in:
phib 2010-03-10 23:30:50 +00:00
parent 481c619b17
commit 1660f62fe3
1 changed files with 13 additions and 2 deletions

View File

@ -126,7 +126,10 @@ public class AGlassPane extends JPanel implements MouseListener, ActionListener
m_timervalue = 0; m_timervalue = 0;
// Start Timer // Start Timer
if(m_timer == null)
{
m_timer = new Timer (1000, this); // every second m_timer = new Timer (1000, this); // every second
}
m_timer.start(); m_timer.start();
if (!isVisible()) if (!isVisible())
@ -134,6 +137,14 @@ public class AGlassPane extends JPanel implements MouseListener, ActionListener
repaint(); repaint();
} // setBusyTimer } // setBusyTimer
@Override
public void setVisible(boolean flag) {
if(!flag && m_timer != null)
{
m_timer.stop();
}
super.setVisible(flag);
}
/** /**
* ActionListener * ActionListener
* @param e event * @param e event