See test case in attachment.
You can click or focus on Button object, if there are only Button object inside panels and there is no Button object directly added to Window object. When there is Button object added directly to Window object, then all buttons (including those inside Panel) are working as expected.
Using: lanterna-2.1.7 on Mac OS X 10.9.1
- App.java 1.27KB
Comment #1
Posted on Jan 2, 2014 by Helpful ElephantCorrection: You CAN'T click or focus on Button object...
Comment #2
Posted on Feb 16, 2014 by Grumpy OxIf you add the button to the panel before adding the panel to the window, it will work. When you add the empty panel to the window, it's looking for something to set focus on, but since the panel is empty, there is nothing. Then when you add the button to the panel, the window doesn't know about it so you either need to call setFocus(..) or add another component to make it scan again.
I've added some code to deal with this on 2.1.x-branch, now it will detect a window doesn't have anything in focus and scan the components.
Status: Fixed
Labels:
Type-Defect
Priority-Medium