{"action":"created","issue":{"url":"https://api.github.com/repos/mabe02/lanterna/issues/356","repository_url":"https://api.github.com/repos/mabe02/lanterna","labels_url":"https://api.github.com/repos/mabe02/lanterna/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/mabe02/lanterna/issues/356/comments","events_url":"https://api.github.com/repos/mabe02/lanterna/issues/356/events","html_url":"https://github.com/mabe02/lanterna/issues/356","id":304431021,"number":356,"title":"screen.close() + Raspian?","user":{"login":"EweLoHD","id":22636066,"avatar_url":"https://avatars2.githubusercontent.com/u/22636066?v=4","gravatar_id":"","url":"https://api.github.com/users/EweLoHD","html_url":"https://github.com/EweLoHD","followers_url":"https://api.github.com/users/EweLoHD/followers","following_url":"https://api.github.com/users/EweLoHD/following{/other_user}","gists_url":"https://api.github.com/users/EweLoHD/gists{/gist_id}","starred_url":"https://api.github.com/users/EweLoHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EweLoHD/subscriptions","organizations_url":"https://api.github.com/users/EweLoHD/orgs","repos_url":"https://api.github.com/users/EweLoHD/repos","events_url":"https://api.github.com/users/EweLoHD/events{/privacy}","received_events_url":"https://api.github.com/users/EweLoHD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-12T15:54:10Z","updated_at":"2018-03-12T18:24:15Z","closed_at":null,"author_association":"NONE","body":"Hey, I'm have written some Code with laterna on my Windows Pc and it worked fine, but when I ran my Code on my RaspberryPi and I press the <Enter> Button, so It should close the Screen, my code freezes and does nothing happens. The <Cancel> Button works. I'm using Java 8 and as SSH Client I'm using Terminus (I tried also Putty).\r\n\r\n### Screenshot:\r\n![https://i.imgur.com/WuKuVhi.png](https://i.imgur.com/WuKuVhi.png)\r\n\r\n### My Code:\r\n```java\r\npublic String token(){\r\n\tString t =null;\r\n\ttry {\r\n\t   input = new FileInputStream(\"config.properties\");\r\n\t   prop.load(input);\r\n\r\n            //Terminal\r\n            Terminal terminal = new DefaultTerminalFactory().createTerminal();\r\n            Screen screen = new TerminalScreen(terminal);\r\n            screen.startScreen();\r\n\r\n            //ComboBox\r\n            ComboBox<String> comboBox = new ComboBox<String>();\r\n            comboBox.addItem(\"Normal\");\r\n            comboBox.addItem(\"Dev\");\r\n\r\n            //Panel\r\n            Panel panel = new Panel();\r\n            panel.setLayoutManager(new GridLayout(3));\r\n\r\n            //Label\r\n            panel.addComponent(new Label(\"Choose a Bot: \"));\r\n\r\n            //Add Combobox\r\n            panel.addComponent(comboBox);\r\n\r\n            //Add some Space\r\n            panel.addComponent(new EmptySpace(new TerminalSize(3,1)));\r\n            panel.addComponent(new EmptySpace(new TerminalSize(3,1)));\r\n            panel.addComponent(new EmptySpace(new TerminalSize(3,1)));\r\n            panel.addComponent(new EmptySpace(new TerminalSize(3,1)));\r\n            panel.addComponent(new EmptySpace(new TerminalSize(3,1)));\r\n\r\n            //Add Button\r\n            Button button = new Button(\"Enter\", new Runnable() {\r\n\r\n                @Override\r\n                public void run() {\r\n                    try {\r\n                        System.out.println(\"hi\");\r\n                        screen.close();\r\n                    } catch (IOException e) {\r\n                        e.printStackTrace();\r\n                    }\r\n                }\r\n            });\r\n            panel.addComponent(button);\r\n\r\n            Button buttonc = new Button(\"Cancel\", new Runnable() {\r\n\r\n                @Override\r\n                public void run() {\r\n                    System.exit(1);\r\n                }\r\n            });\r\n            panel.addComponent(buttonc);\r\n\r\n\r\n            // Create window to hold the panel\r\n            BasicWindow window = new BasicWindow();\r\n            window.setHints(Arrays.asList(Window.Hint.CENTERED));\r\n            window.setComponent(panel);\r\n\r\n            // Create gui and start gui\r\n            MultiWindowTextGUI gui = new MultiWindowTextGUI(screen, new DefaultWindowManager(), new EmptySpace(TextColor.ANSI.BLUE));\r\n            gui.addWindowAndWait(window);\r\n\r\n\r\n            if(comboBox.getSelectedIndex() == 0){\r\n                t = prop.getProperty(\"token\");\r\n            }\r\n            else {\r\n                t = prop.getProperty(\"token_dev\");\r\n            }\r\n            t = prop.getProperty(\"token\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn t;\r\n\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/mabe02/lanterna/issues/comments/372414116","html_url":"https://github.com/mabe02/lanterna/issues/356#issuecomment-372414116","issue_url":"https://api.github.com/repos/mabe02/lanterna/issues/356","id":372414116,"user":{"login":"EweLoHD","id":22636066,"avatar_url":"https://avatars2.githubusercontent.com/u/22636066?v=4","gravatar_id":"","url":"https://api.github.com/users/EweLoHD","html_url":"https://github.com/EweLoHD","followers_url":"https://api.github.com/users/EweLoHD/followers","following_url":"https://api.github.com/users/EweLoHD/following{/other_user}","gists_url":"https://api.github.com/users/EweLoHD/gists{/gist_id}","starred_url":"https://api.github.com/users/EweLoHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EweLoHD/subscriptions","organizations_url":"https://api.github.com/users/EweLoHD/orgs","repos_url":"https://api.github.com/users/EweLoHD/repos","events_url":"https://api.github.com/users/EweLoHD/events{/privacy}","received_events_url":"https://api.github.com/users/EweLoHD/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T18:24:15Z","updated_at":"2018-03-12T18:24:15Z","author_association":"NONE","body":"Thank you very much! It (nearly) works now, but there is an other Problem: When the Window is closed and it prints something out it looks very buggy and I can't type something in:\r\n\r\n![https://i.imgur.com/o0ZQ8uR.png](https://i.imgur.com/o0ZQ8uR.png)\r\n\r\nThe White Artifact might have something to do with Terminus and its Theme."}}
{"actor":{"display_login":"EweLoHD"}}