{"action":"created","comment":{"url":"https://api.github.com/repos/Vachok/Trainings/pulls/comments/159141513","pull_request_review_id":86048448,"id":159141513,"diff_hunk":"@@ -14,94 +12,160 @@\n \n \n public class Heater {\n-   static int numOfThreads = Runtime.getRuntime().availableProcessors();\n-   private static long freeMemory = Runtime.getRuntime().freeMemory();\n-   private static long totMemory = Runtime.getRuntime().totalMemory();\n+    static long numOfThreads = Runtime.getRuntime().availableProcessors();\n+    private static long freeMemory = Runtime.getRuntime().freeMemory();\n+    private static long totMemory = Runtime.getRuntime().totalMemory();\n+    private static long from;\n+    private static long to;\n \n+    public static long getFrom() {\n+        return from;\n+    }\n \n-    public static void main(String[] args) {\n-        ArrayList<Long> longs = getLongs(); // FIXME: 30.12.2017 проблема. Array отдается быстрее, чем кнопки. Разобраться!\n-        System.out.println(longs);\n+    public static void setFrom(long from) {\n+        Heater.from = from;\n+    }\n+\n+    public static long getTo() {\n+        return to;\n+    }\n \n+    public static void setTo(long to) {\n+        Heater.to = to;\n     }\n \n-    static ArrayList<Long> getLongs() {\n-        ArrayList<Long> longCollection = new ArrayList<Long>();\n-        JFrame one = getFrame(true, 450, 250, 150, 120);\n+    public static void main(String[] args) {\n+        JFrame oneFrame = getFrame(true, 450, 250, 350, 220);\n         JPanel onePan = new JPanel();\n-        one.add(onePan);\n-        one.setAlwaysOnTop(true);\n-        JButton oneButton = new JButton(\"Введите число\");\n-        JButton twoButton = new JButton(\"Второе\");\n-        onePan.add(oneButton);\n-        oneButton.addActionListener(new ActionListener() {\n+        oneFrame.add(onePan);\n+        oneFrame.setAlwaysOnTop(true);\n+        JTextField textPane = new JTextField(\"to\", 10);\n+        JButton continueBitton = new JButton(\"Считаем простые числа\");\n+        onePan.add(continueBitton);\n+        continueBitton.setAlignmentY(40f);\n+        continueBitton.setVisible(true);\n+        onePan.repaint();\n+        continueBitton.addActionListener(new ActionListener() {\n+            @Override\n+            public void actionPerformed(ActionEvent e) {\n+                textPane.setVisible(true);\n+            }\n+        });\n+        textPane.addMouseListener(new MouseAdapter() {\n+            @Override\n+            public void mouseEntered(MouseEvent e) {\n+                super.mouseEntered(e);\n+                textPane.setText(\"\");\n+            }\n+        });\n+        textPane.addActionListener(new ActionListener() {\n             @Override\n             public void actionPerformed(ActionEvent e) {\n-                String s = JOptionPane.showInputDialog(\"Число с которого начнём\");\n-                System.out.println(s);\n-                Long from = Long.parseLong(s);\n-                longCollection.add(from);\n-                oneButton.setVisible(false);\n-                onePan.remove(oneButton);\n-                onePan.revalidate();\n-                onePan.add(twoButton);\n+                String s = e.getActionCommand().toString();\n+                long from = Long.parseLong(s);\n+                setFrom(from);\n+                oneFrame.setTitle(\"Первое записали\");\n+                System.out.println(from);\n+                textPane.setVisible(false);\n+            }\n+        });\n+        JTextField twoPane = new JTextField(\"from\", 10);\n+        twoPane.addMouseListener(new MouseAdapter() {\n+            @Override\n+            public void mouseEntered(MouseEvent e) {\n+                super.mouseEntered(e);\n+                twoPane.setText(\"\");\n             }\n         });\n-        twoButton.addActionListener(new ActionListener() {\n+        twoPane.addActionListener(new ActionListener() {\n             @Override\n             public void actionPerformed(ActionEvent e) {\n-                onePan.revalidate();\n-                one.getFocusOwner();\n-                String s = JOptionPane.showInputDialog(\"Число ДО которого считаем\");\n-                System.out.println(s);\n-                Long to = Long.parseLong(s);\n-                longCollection.add(to);\n-                System.err.println(\"TO - \" + to);\n-                one.removeNotify();\n+                twoPane.getFocusListeners();\n+                String s1 = e.getActionCommand();\n+                long to = Long.parseLong(s1);\n+                setTo(to);","path":"src/global/Heater.java","position":118,"original_position":118,"commit_id":"9210463d0c6d442b6f77efa67c8f466edae415f6","original_commit_id":"9210463d0c6d442b6f77efa67c8f466edae415f6","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"body":"++","created_at":"2017-12-31T14:39:44Z","updated_at":"2017-12-31T14:40:23Z","html_url":"https://github.com/Vachok/Trainings/pull/37#discussion_r159141513","pull_request_url":"https://api.github.com/repos/Vachok/Trainings/pulls/37","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/comments/159141513"},"html":{"href":"https://github.com/Vachok/Trainings/pull/37#discussion_r159141513"},"pull_request":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/Vachok/Trainings/pulls/37","id":160588688,"html_url":"https://github.com/Vachok/Trainings/pull/37","diff_url":"https://github.com/Vachok/Trainings/pull/37.diff","patch_url":"https://github.com/Vachok/Trainings/pull/37.patch","issue_url":"https://api.github.com/repos/Vachok/Trainings/issues/37","number":37,"state":"open","locked":false,"title":"Timeconv branch","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"body":"разобраться как забрать лонги из кнопок\r\n\r\nBREAKING CHANGE: https://goo.gl/Pgg7zh","created_at":"2017-12-30T12:56:54Z","updated_at":"2017-12-31T14:40:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e61b2caac2cd35ff09d327c2b85cb4509ee3cd4","assignee":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"assignees":[{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/Vachok/Trainings/milestones/3","html_url":"https://github.com/Vachok/Trainings/milestone/3","labels_url":"https://api.github.com/repos/Vachok/Trainings/milestones/3/labels","id":2983777,"number":3,"title":"Metodik","description":null,"creator":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2017-12-16T10:03:12Z","updated_at":"2017-12-31T14:35:11Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Vachok/Trainings/pulls/37/commits","review_comments_url":"https://api.github.com/repos/Vachok/Trainings/pulls/37/comments","review_comment_url":"https://api.github.com/repos/Vachok/Trainings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vachok/Trainings/issues/37/comments","statuses_url":"https://api.github.com/repos/Vachok/Trainings/statuses/9210463d0c6d442b6f77efa67c8f466edae415f6","head":{"label":"Vachok:Timeconv","ref":"Timeconv","sha":"9210463d0c6d442b6f77efa67c8f466edae415f6","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"repo":{"id":114241802,"name":"Trainings","full_name":"Vachok/Trainings","owner":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vachok/Trainings","description":null,"fork":false,"url":"https://api.github.com/repos/Vachok/Trainings","forks_url":"https://api.github.com/repos/Vachok/Trainings/forks","keys_url":"https://api.github.com/repos/Vachok/Trainings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vachok/Trainings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vachok/Trainings/teams","hooks_url":"https://api.github.com/repos/Vachok/Trainings/hooks","issue_events_url":"https://api.github.com/repos/Vachok/Trainings/issues/events{/number}","events_url":"https://api.github.com/repos/Vachok/Trainings/events","assignees_url":"https://api.github.com/repos/Vachok/Trainings/assignees{/user}","branches_url":"https://api.github.com/repos/Vachok/Trainings/branches{/branch}","tags_url":"https://api.github.com/repos/Vachok/Trainings/tags","blobs_url":"https://api.github.com/repos/Vachok/Trainings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vachok/Trainings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vachok/Trainings/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vachok/Trainings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vachok/Trainings/statuses/{sha}","languages_url":"https://api.github.com/repos/Vachok/Trainings/languages","stargazers_url":"https://api.github.com/repos/Vachok/Trainings/stargazers","contributors_url":"https://api.github.com/repos/Vachok/Trainings/contributors","subscribers_url":"https://api.github.com/repos/Vachok/Trainings/subscribers","subscription_url":"https://api.github.com/repos/Vachok/Trainings/subscription","commits_url":"https://api.github.com/repos/Vachok/Trainings/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vachok/Trainings/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vachok/Trainings/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vachok/Trainings/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vachok/Trainings/contents/{+path}","compare_url":"https://api.github.com/repos/Vachok/Trainings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vachok/Trainings/merges","archive_url":"https://api.github.com/repos/Vachok/Trainings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vachok/Trainings/downloads","issues_url":"https://api.github.com/repos/Vachok/Trainings/issues{/number}","pulls_url":"https://api.github.com/repos/Vachok/Trainings/pulls{/number}","milestones_url":"https://api.github.com/repos/Vachok/Trainings/milestones{/number}","notifications_url":"https://api.github.com/repos/Vachok/Trainings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vachok/Trainings/labels{/name}","releases_url":"https://api.github.com/repos/Vachok/Trainings/releases{/id}","deployments_url":"https://api.github.com/repos/Vachok/Trainings/deployments","created_at":"2017-12-14T11:22:11Z","updated_at":"2017-12-20T21:06:38Z","pushed_at":"2017-12-31T14:35:29Z","git_url":"git://github.com/Vachok/Trainings.git","ssh_url":"git@github.com:Vachok/Trainings.git","clone_url":"https://github.com/Vachok/Trainings.git","svn_url":"https://github.com/Vachok/Trainings","homepage":null,"size":1024,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"Vachok:master","ref":"master","sha":"796fcec978b23e3c19336fd7d5c7118c0449cfa7","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"repo":{"id":114241802,"name":"Trainings","full_name":"Vachok/Trainings","owner":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vachok/Trainings","description":null,"fork":false,"url":"https://api.github.com/repos/Vachok/Trainings","forks_url":"https://api.github.com/repos/Vachok/Trainings/forks","keys_url":"https://api.github.com/repos/Vachok/Trainings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vachok/Trainings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vachok/Trainings/teams","hooks_url":"https://api.github.com/repos/Vachok/Trainings/hooks","issue_events_url":"https://api.github.com/repos/Vachok/Trainings/issues/events{/number}","events_url":"https://api.github.com/repos/Vachok/Trainings/events","assignees_url":"https://api.github.com/repos/Vachok/Trainings/assignees{/user}","branches_url":"https://api.github.com/repos/Vachok/Trainings/branches{/branch}","tags_url":"https://api.github.com/repos/Vachok/Trainings/tags","blobs_url":"https://api.github.com/repos/Vachok/Trainings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vachok/Trainings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vachok/Trainings/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vachok/Trainings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vachok/Trainings/statuses/{sha}","languages_url":"https://api.github.com/repos/Vachok/Trainings/languages","stargazers_url":"https://api.github.com/repos/Vachok/Trainings/stargazers","contributors_url":"https://api.github.com/repos/Vachok/Trainings/contributors","subscribers_url":"https://api.github.com/repos/Vachok/Trainings/subscribers","subscription_url":"https://api.github.com/repos/Vachok/Trainings/subscription","commits_url":"https://api.github.com/repos/Vachok/Trainings/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vachok/Trainings/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vachok/Trainings/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vachok/Trainings/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vachok/Trainings/contents/{+path}","compare_url":"https://api.github.com/repos/Vachok/Trainings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vachok/Trainings/merges","archive_url":"https://api.github.com/repos/Vachok/Trainings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vachok/Trainings/downloads","issues_url":"https://api.github.com/repos/Vachok/Trainings/issues{/number}","pulls_url":"https://api.github.com/repos/Vachok/Trainings/pulls{/number}","milestones_url":"https://api.github.com/repos/Vachok/Trainings/milestones{/number}","notifications_url":"https://api.github.com/repos/Vachok/Trainings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vachok/Trainings/labels{/name}","releases_url":"https://api.github.com/repos/Vachok/Trainings/releases{/id}","deployments_url":"https://api.github.com/repos/Vachok/Trainings/deployments","created_at":"2017-12-14T11:22:11Z","updated_at":"2017-12-20T21:06:38Z","pushed_at":"2017-12-31T14:35:29Z","git_url":"git://github.com/Vachok/Trainings.git","ssh_url":"git@github.com:Vachok/Trainings.git","clone_url":"https://github.com/Vachok/Trainings.git","svn_url":"https://github.com/Vachok/Trainings","homepage":null,"size":1024,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/37"},"html":{"href":"https://github.com/Vachok/Trainings/pull/37"},"issue":{"href":"https://api.github.com/repos/Vachok/Trainings/issues/37"},"comments":{"href":"https://api.github.com/repos/Vachok/Trainings/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vachok/Trainings/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/Vachok/Trainings/statuses/9210463d0c6d442b6f77efa67c8f466edae415f6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Vachok"}}