{"action":"created","comment":{"url":"https://api.github.com/repos/drewhannay/chess/pulls/comments/24372401","id":24372401,"diff_hunk":"@@ -35,11 +37,48 @@ public BoardPanel(BoardSize boardSize, SquareConfig squareConfig,\n         mBoardSize = boardSize;\n         mSquareLabels = new ArrayList<>(boardSize.width * boardSize.height);\n \n+        addComponentListener(new ComponentListener() {\n+            @Override\n+            public void componentResized(ComponentEvent e) {\n+                int size = Math.min(e.getComponent().getHeight(), e.getComponent().getWidth());\n+                setMinimumSize(new Dimension(size, size));\n+                setPreferredSize(new Dimension(size, size));\n+                setMaximumSize(new Dimension(size, size));\n+            }\n+\n+            @Override\n+            public void componentMoved(ComponentEvent e) {\n+\n+            }\n+\n+            @Override\n+            public void componentShown(ComponentEvent e) {\n+\n+            }\n+\n+            @Override\n+            public void componentHidden(ComponentEvent e) {\n+\n+            }\n+        });\n+\n         GridLayout gridLayout = new GridLayout(mBoardSize.width + 2, mBoardSize.height + 2);\n         setLayout(gridLayout);\n         createGrid(gridLayout);\n     }\n \n+    public void updateDimensions(int width, int height) {\n+        if (height > width) {","path":"ChessCrafterDesktop/src/main/java/com/drewhannay/chesscrafter/panel/BoardPanel.java","position":44,"original_position":44,"commit_id":"1de81f22e8e25c2c286421b20061183bf5c36c59","original_commit_id":"1de81f22e8e25c2c286421b20061183bf5c36c59","user":{"login":"drewhannay","id":903035,"avatar_url":"https://avatars.githubusercontent.com/u/903035?v=3","gravatar_id":"","url":"https://api.github.com/users/drewhannay","html_url":"https://github.com/drewhannay","followers_url":"https://api.github.com/users/drewhannay/followers","following_url":"https://api.github.com/users/drewhannay/following{/other_user}","gists_url":"https://api.github.com/users/drewhannay/gists{/gist_id}","starred_url":"https://api.github.com/users/drewhannay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewhannay/subscriptions","organizations_url":"https://api.github.com/users/drewhannay/orgs","repos_url":"https://api.github.com/users/drewhannay/repos","events_url":"https://api.github.com/users/drewhannay/events{/privacy}","received_events_url":"https://api.github.com/users/drewhannay/received_events","type":"User","site_admin":false},"body":"Why not do the same `size` trick here?","created_at":"2015-02-09T22:34:36Z","updated_at":"2015-02-09T22:34:36Z","html_url":"https://github.com/drewhannay/chess/pull/224#discussion_r24372401","pull_request_url":"https://api.github.com/repos/drewhannay/chess/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/comments/24372401"},"html":{"href":"https://github.com/drewhannay/chess/pull/224#discussion_r24372401"},"pull_request":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/drewhannay/chess/pulls/224","id":28961077,"html_url":"https://github.com/drewhannay/chess/pull/224","diff_url":"https://github.com/drewhannay/chess/pull/224.diff","patch_url":"https://github.com/drewhannay/chess/pull/224.patch","issue_url":"https://api.github.com/repos/drewhannay/chess/issues/224","number":224,"state":"open","locked":false,"title":"Boards will now only size to squares for new games and piece creation","user":{"login":"jmccormi","id":1836479,"avatar_url":"https://avatars.githubusercontent.com/u/1836479?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccormi","html_url":"https://github.com/jmccormi","followers_url":"https://api.github.com/users/jmccormi/followers","following_url":"https://api.github.com/users/jmccormi/following{/other_user}","gists_url":"https://api.github.com/users/jmccormi/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccormi/subscriptions","organizations_url":"https://api.github.com/users/jmccormi/orgs","repos_url":"https://api.github.com/users/jmccormi/repos","events_url":"https://api.github.com/users/jmccormi/events{/privacy}","received_events_url":"https://api.github.com/users/jmccormi/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-09T22:06:23Z","updated_at":"2015-02-09T22:34:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b43a79bb0f110fe75a608437c4b129cb0f1dcfee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drewhannay/chess/pulls/224/commits","review_comments_url":"https://api.github.com/repos/drewhannay/chess/pulls/224/comments","review_comment_url":"https://api.github.com/repos/drewhannay/chess/pulls/comments/{number}","comments_url":"https://api.github.com/repos/drewhannay/chess/issues/224/comments","statuses_url":"https://api.github.com/repos/drewhannay/chess/statuses/1de81f22e8e25c2c286421b20061183bf5c36c59","head":{"label":"jmccormi:DialogUpdates","ref":"DialogUpdates","sha":"1de81f22e8e25c2c286421b20061183bf5c36c59","user":{"login":"jmccormi","id":1836479,"avatar_url":"https://avatars.githubusercontent.com/u/1836479?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccormi","html_url":"https://github.com/jmccormi","followers_url":"https://api.github.com/users/jmccormi/followers","following_url":"https://api.github.com/users/jmccormi/following{/other_user}","gists_url":"https://api.github.com/users/jmccormi/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccormi/subscriptions","organizations_url":"https://api.github.com/users/jmccormi/orgs","repos_url":"https://api.github.com/users/jmccormi/repos","events_url":"https://api.github.com/users/jmccormi/events{/privacy}","received_events_url":"https://api.github.com/users/jmccormi/received_events","type":"User","site_admin":false},"repo":{"id":4619042,"name":"chess","full_name":"jmccormi/chess","owner":{"login":"jmccormi","id":1836479,"avatar_url":"https://avatars.githubusercontent.com/u/1836479?v=3","gravatar_id":"","url":"https://api.github.com/users/jmccormi","html_url":"https://github.com/jmccormi","followers_url":"https://api.github.com/users/jmccormi/followers","following_url":"https://api.github.com/users/jmccormi/following{/other_user}","gists_url":"https://api.github.com/users/jmccormi/gists{/gist_id}","starred_url":"https://api.github.com/users/jmccormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmccormi/subscriptions","organizations_url":"https://api.github.com/users/jmccormi/orgs","repos_url":"https://api.github.com/users/jmccormi/repos","events_url":"https://api.github.com/users/jmccormi/events{/privacy}","received_events_url":"https://api.github.com/users/jmccormi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmccormi/chess","description":"","fork":true,"url":"https://api.github.com/repos/jmccormi/chess","forks_url":"https://api.github.com/repos/jmccormi/chess/forks","keys_url":"https://api.github.com/repos/jmccormi/chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmccormi/chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmccormi/chess/teams","hooks_url":"https://api.github.com/repos/jmccormi/chess/hooks","issue_events_url":"https://api.github.com/repos/jmccormi/chess/issues/events{/number}","events_url":"https://api.github.com/repos/jmccormi/chess/events","assignees_url":"https://api.github.com/repos/jmccormi/chess/assignees{/user}","branches_url":"https://api.github.com/repos/jmccormi/chess/branches{/branch}","tags_url":"https://api.github.com/repos/jmccormi/chess/tags","blobs_url":"https://api.github.com/repos/jmccormi/chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmccormi/chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmccormi/chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmccormi/chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmccormi/chess/statuses/{sha}","languages_url":"https://api.github.com/repos/jmccormi/chess/languages","stargazers_url":"https://api.github.com/repos/jmccormi/chess/stargazers","contributors_url":"https://api.github.com/repos/jmccormi/chess/contributors","subscribers_url":"https://api.github.com/repos/jmccormi/chess/subscribers","subscription_url":"https://api.github.com/repos/jmccormi/chess/subscription","commits_url":"https://api.github.com/repos/jmccormi/chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmccormi/chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmccormi/chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmccormi/chess/issues/comments/{number}","contents_url":"https://api.github.com/repos/jmccormi/chess/contents/{+path}","compare_url":"https://api.github.com/repos/jmccormi/chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmccormi/chess/merges","archive_url":"https://api.github.com/repos/jmccormi/chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmccormi/chess/downloads","issues_url":"https://api.github.com/repos/jmccormi/chess/issues{/number}","pulls_url":"https://api.github.com/repos/jmccormi/chess/pulls{/number}","milestones_url":"https://api.github.com/repos/jmccormi/chess/milestones{/number}","notifications_url":"https://api.github.com/repos/jmccormi/chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmccormi/chess/labels{/name}","releases_url":"https://api.github.com/repos/jmccormi/chess/releases{/id}","created_at":"2012-06-10T22:42:09Z","updated_at":"2013-11-16T03:19:11Z","pushed_at":"2015-02-09T22:31:26Z","git_url":"git://github.com/jmccormi/chess.git","ssh_url":"git@github.com:jmccormi/chess.git","clone_url":"https://github.com/jmccormi/chess.git","svn_url":"https://github.com/jmccormi/chess","homepage":null,"size":9412,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"drewhannay:rewrite","ref":"rewrite","sha":"985c8f3c754a1be5d59f741062f4bea56e96bcf4","user":{"login":"drewhannay","id":903035,"avatar_url":"https://avatars.githubusercontent.com/u/903035?v=3","gravatar_id":"","url":"https://api.github.com/users/drewhannay","html_url":"https://github.com/drewhannay","followers_url":"https://api.github.com/users/drewhannay/followers","following_url":"https://api.github.com/users/drewhannay/following{/other_user}","gists_url":"https://api.github.com/users/drewhannay/gists{/gist_id}","starred_url":"https://api.github.com/users/drewhannay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewhannay/subscriptions","organizations_url":"https://api.github.com/users/drewhannay/orgs","repos_url":"https://api.github.com/users/drewhannay/repos","events_url":"https://api.github.com/users/drewhannay/events{/privacy}","received_events_url":"https://api.github.com/users/drewhannay/received_events","type":"User","site_admin":false},"repo":{"id":4608947,"name":"chess","full_name":"drewhannay/chess","owner":{"login":"drewhannay","id":903035,"avatar_url":"https://avatars.githubusercontent.com/u/903035?v=3","gravatar_id":"","url":"https://api.github.com/users/drewhannay","html_url":"https://github.com/drewhannay","followers_url":"https://api.github.com/users/drewhannay/followers","following_url":"https://api.github.com/users/drewhannay/following{/other_user}","gists_url":"https://api.github.com/users/drewhannay/gists{/gist_id}","starred_url":"https://api.github.com/users/drewhannay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewhannay/subscriptions","organizations_url":"https://api.github.com/users/drewhannay/orgs","repos_url":"https://api.github.com/users/drewhannay/repos","events_url":"https://api.github.com/users/drewhannay/events{/privacy}","received_events_url":"https://api.github.com/users/drewhannay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drewhannay/chess","description":"A Java application for defining and playing chess variants","fork":false,"url":"https://api.github.com/repos/drewhannay/chess","forks_url":"https://api.github.com/repos/drewhannay/chess/forks","keys_url":"https://api.github.com/repos/drewhannay/chess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drewhannay/chess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drewhannay/chess/teams","hooks_url":"https://api.github.com/repos/drewhannay/chess/hooks","issue_events_url":"https://api.github.com/repos/drewhannay/chess/issues/events{/number}","events_url":"https://api.github.com/repos/drewhannay/chess/events","assignees_url":"https://api.github.com/repos/drewhannay/chess/assignees{/user}","branches_url":"https://api.github.com/repos/drewhannay/chess/branches{/branch}","tags_url":"https://api.github.com/repos/drewhannay/chess/tags","blobs_url":"https://api.github.com/repos/drewhannay/chess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drewhannay/chess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drewhannay/chess/git/refs{/sha}","trees_url":"https://api.github.com/repos/drewhannay/chess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drewhannay/chess/statuses/{sha}","languages_url":"https://api.github.com/repos/drewhannay/chess/languages","stargazers_url":"https://api.github.com/repos/drewhannay/chess/stargazers","contributors_url":"https://api.github.com/repos/drewhannay/chess/contributors","subscribers_url":"https://api.github.com/repos/drewhannay/chess/subscribers","subscription_url":"https://api.github.com/repos/drewhannay/chess/subscription","commits_url":"https://api.github.com/repos/drewhannay/chess/commits{/sha}","git_commits_url":"https://api.github.com/repos/drewhannay/chess/git/commits{/sha}","comments_url":"https://api.github.com/repos/drewhannay/chess/comments{/number}","issue_comment_url":"https://api.github.com/repos/drewhannay/chess/issues/comments/{number}","contents_url":"https://api.github.com/repos/drewhannay/chess/contents/{+path}","compare_url":"https://api.github.com/repos/drewhannay/chess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drewhannay/chess/merges","archive_url":"https://api.github.com/repos/drewhannay/chess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drewhannay/chess/downloads","issues_url":"https://api.github.com/repos/drewhannay/chess/issues{/number}","pulls_url":"https://api.github.com/repos/drewhannay/chess/pulls{/number}","milestones_url":"https://api.github.com/repos/drewhannay/chess/milestones{/number}","notifications_url":"https://api.github.com/repos/drewhannay/chess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drewhannay/chess/labels{/name}","releases_url":"https://api.github.com/repos/drewhannay/chess/releases{/id}","created_at":"2012-06-09T17:21:10Z","updated_at":"2015-01-03T20:00:04Z","pushed_at":"2015-02-09T20:11:40Z","git_url":"git://github.com/drewhannay/chess.git","ssh_url":"git@github.com:drewhannay/chess.git","clone_url":"https://github.com/drewhannay/chess.git","svn_url":"https://github.com/drewhannay/chess","homepage":"","size":10385,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":23,"forks":36,"open_issues":23,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/224"},"html":{"href":"https://github.com/drewhannay/chess/pull/224"},"issue":{"href":"https://api.github.com/repos/drewhannay/chess/issues/224"},"comments":{"href":"https://api.github.com/repos/drewhannay/chess/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/drewhannay/chess/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/drewhannay/chess/statuses/1de81f22e8e25c2c286421b20061183bf5c36c59"}}}}