Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1005573 // Test dragging JFrame with Robot in other thread [BUG on Linux]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1510L/10K/38K).

!752

p {
  swingAndWait(r {
    JFrame frame = showFrame();
    frame.setBounds(0, 0, 400, 400);
  });
  
  Point a = new Point(50, 10), b = new Point(150, 10);
  final new Robot robot;
  sleep(1000);
  robot.mouseMove(a.x, a.y);
  final int button = InputEvent.BUTTON1_DOWN_MASK;
  robot.mousePress(button);
  sleep(500);
  robot.mouseMove(b.x, b.y);
  robot.mouseRelease(button);
}

Author comment

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: 539 / 607
Referenced in: #1005574 - Test dragging JFrame with Robot with undecorated (L&F-decorated) frame [works]