Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Tipo Variabile

  1. #1
    Utente di HTML.it
    Registrato dal
    Jun 2009
    Messaggi
    20

    Tipo Variabile

    In un progetto mi sono trovato di fronte a questo tipo di variabile: private Robot rbt
    Qualcuno sa spiegarmi qualcosa in più su quest'ultima?
    grazie

  2. #2
    Utente di HTML.it L'avatar di Alex'87
    Registrato dal
    Aug 2001
    residenza
    Verona
    Messaggi
    5,802
    Contesto? Potrebbe essere java.awt.Robot od una delle migliaia di altre classi con lo stesso nome...
    SpringSource Certified Spring Professional | Pivotal Certified Enterprise Integration Specialist
    Di questo libro e degli altri (blog personale di recensioni libri) | ​NO M.P. TECNICI

  3. #3
    Utente di HTML.it
    Registrato dal
    Jun 2009
    Messaggi
    20
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;

    queste sono le uniche import....il programma è un semplice gioco del ping-pong molto stilizzato (sfondo nero e due rettangoli bianchi per le racchette):

  4. #4
    Utente di HTML.it L'avatar di Alex'87
    Registrato dal
    Aug 2001
    residenza
    Verona
    Messaggi
    5,802
    Allora si tratta di java.awt.Robot

    Direttamente dalla javadoc:

    This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.

    Using the class to generate input events differs from posting events to the AWT event queue or AWT components in that the events are generated in the platform's native input queue. For example, Robot.mouseMove will actually move the mouse cursor instead of just generating mouse move events.

    Note that some platforms require special privileges or extensions to access low-level input control. If the current platform configuration does not allow input control, an AWTException will be thrown when trying to construct Robot objects. For example, X-Window systems will throw the exception if the XTEST 2.2 standard extension is not supported (or not enabled) by the X server.

    Applications that use Robot for purposes other than self-testing should handle these error conditions gracefully.
    http://java.sun.com/j2se/1.5.0/docs/...awt/Robot.html
    SpringSource Certified Spring Professional | Pivotal Certified Enterprise Integration Specialist
    Di questo libro e degli altri (blog personale di recensioni libri) | ​NO M.P. TECNICI

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.