-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
beta
-
x86
-
windows_nt
Name: yyT116575 Date: 12/01/2000
Java(TM) 2 Runtime Environment,Standard Edition(build 1.3.0-C)
Java HotSpot(TM) Client VM(build 1.3.0-C,mixed mode)
1. The constructor for javax.swing.Timer, Timer(int delay,ActionListener
listener) doesn't throw IllegalArgumentException for invalid delay, if delay is
set less than zero.
2. The sample code is,
import javax.swing.*;
import java.awt.event.*;
class Test extends Thread implements ActionListener
{
public static void main(String args[])
{
Test m = new Test();
m.start();
}
public void run()
{
Timer m = new Timer(-2000,this);//here delay < 0
m.start();
while(true)
{
try
{
Thread.sleep(200);
}
catch(InterruptedException exp){}
}
}
public void actionPerformed(ActionEvent e)
{
System.out.print(" Hello World ");
}
}
(Review ID: 112976)
======================================================================