Java Robot.setAutoDelay(int ms)

Syntax

Robot.setAutoDelay(int ms) has the following syntax.

public void setAutoDelay(int ms)

Example

In the following code shows how to use Robot.setAutoDelay(int ms) method.


import java.awt.Robot;
//  w  ww. j  a v  a  2  s  . com
public class Main {
  public static void main(String[] args) throws Exception {
    Robot robot = new Robot();

    robot.setAutoDelay(1000);
    System.out.println(robot.getAutoDelay());
    
  }
}




















Home »
  Java Tutorial »
    java.awt »




BasicStroke
BorderLayout
CardLayout
Color
Cursor
Desktop
DesktopManager
DisplayMode
EventQueue
FlowLayout
FocusTraversalPolicy
Font
FontMetrics
GradientPaint
Graphics
Graphics2D
GraphicsConfiguration
GraphicsDevice
GraphicsEnvironment
GridBagConstraints
GridBagLayout
GridLayout
Image
ItemSelectable
KeyboardFocusManager
LayoutManager
LayoutManager2
Point
Rectangle
Robot
Shape
SplashScreen
SystemColor
SystemTray
TexturePaint
TrayIcon
Toolkit
Transparency