Libraryless. Click here for Pure Java version (1510L/10K/38K).
1 | !752 |
2 | |
3 | p { |
4 | swingAndWait(r { |
5 | JFrame frame = showFrame(); |
6 | frame.setBounds(0, 0, 400, 400); |
7 | }); |
8 | |
9 | Point a = new Point(50, 10), b = new Point(150, 10); |
10 | final new Robot robot; |
11 | sleep(1000); |
12 | robot.mouseMove(a.x, a.y); |
13 | final int button = InputEvent.BUTTON1_DOWN_MASK; |
14 | robot.mousePress(button); |
15 | sleep(500); |
16 | robot.mouseMove(b.x, b.y); |
17 | robot.mouseRelease(button); |
18 | } |
Began life as a copy of #1005572
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, etmzoiygucik, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005573 |
Snippet name: | Test dragging JFrame with Robot in other thread [BUG on Linux] |
Eternal ID of this version: | #1005573/1 |
Text MD5: | fd8ae37291f2671bab37494a80597eef |
Transpilation MD5: | cc3bd69345e3ab83713425f0d559d9e2 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-11-28 15:08:29 |
Source code size: | 401 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 540 / 609 |
Referenced in: | [show references] |