hbyint / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Error adding a checkbox to a table #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to add a checkbox to records in a table to enable operations on 
multiple records and I see this error while showing the window.

java.lang.IllegalArgumentException: TerminalSize.columns cannot be less than 0!
        at com.googlecode.lanterna.terminal.TerminalSize.setColumns(TerminalSize.java:49)
        at com.googlecode.lanterna.gui.TextGraphics.subAreaGraphics(TextGraphics.java:80)
        at com.googlecode.lanterna.gui.component.CommonCheckBox.repaint(CommonCheckBox.java:66)
        at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
        at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
        at com.googlecode.lanterna.gui.component.Table.repaint(Table.java:130)
        at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
        at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
        at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
        at com.googlecode.lanterna.gui.Window.repaint(Window.java:109)
        at com.googlecode.lanterna.gui.GUIScreen.repaint(GUIScreen.java:157)
        at com.googlecode.lanterna.gui.GUIScreen.update(GUIScreen.java:170)
        at com.googlecode.lanterna.gui.GUIScreen.doEventLoop(GUIScreen.java:204)
        at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:272)

Original issue reported on code.google.com by m.vino...@gmail.com on 24 Jul 2012 at 3:20

GoogleCodeExporter commented 9 years ago
Clearly a bug, I'll have a look

Original comment by mab...@gmail.com on 25 Jul 2012 at 12:09

GoogleCodeExporter commented 9 years ago
This seems to be more generic. Trying to add any Component into a table gives 
me this error.

Original comment by m.vino...@gmail.com on 2 Aug 2012 at 4:49

GoogleCodeExporter commented 9 years ago
I was able to overcome this issue when I stopped creating a custom terminal and 
let the TerminalFacade create it.

Original comment by m.vino...@gmail.com on 8 Aug 2012 at 7:26

GoogleCodeExporter commented 9 years ago
If possible, do you think you could make a very simple test where it fails and 
one with your workaround? Just to make sure whatever fix is coming will work 
for you.

Original comment by mab...@gmail.com on 9 Aug 2012 at 11:27

GoogleCodeExporter commented 9 years ago
I've tried to play around with this but I can't reproduce the error, so if you 
have some example code where this breaks, it would be most appreciated...

Original comment by mab...@gmail.com on 11 Aug 2012 at 1:23