Empyreus / lanterna

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

TextGraphics.getWidth=0 in TextBox.repaint() #131

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I get exceptions due to TextGraphics being 0 in TextBox.repaint() method.

As a solution, I had to change

  if(displayString.length() > graphics.getWidth())

to

  if(displayString.length() > graphics.getWidth() && graphics.getWidth()>0);

Lanterna 2.1.9

Regards,
Aydin

Original issue reported on code.google.com by ako...@gmail.com on 17 Apr 2015 at 8:22