Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Java swt で三目並べプログラムを書いており、コンピュータがボタンを「クリック」して X/O を表示する方法を見つけようとしています。助言がありますか?
まず、マウスをボタンの位置に移動してから、マウスボタンを押して放します。
Robot r = new Robot(); r.mouseMove(500, 340); //Assuming this is the button location. r.mousePress( InputEvent.BUTTON1_MASK ); r.mouseRelease( InputEvent.BUTTON1_MASK );