Drawing a rectaNGLE ON TOP AND BOTTOM OF tft SCREEN

LS,

I want to draw two rectangles on my 160x128 pixel TFT screen.
On the top side a box that contains some text and a second one in the lowwer part that is colored.

TFTscreen.drawRect(0, 116, 160, 12, WHITE);
  TFTscreen.text("12345678901234567890123456", 2, 2);

these two lines of code do draw a nice box in the upper part of the screen.
But if I add the next line the top rectangle becomes green and a clear box is drawn

  TFTscreen.fillRect(0, 0, 160, 12, GREEN);

Is this correct behavior??

gharryh:
Is this correct behavior??

Can I guess "no, it isn't" ?

Adafruit GFX says :

But what library do you use? I suppose you effectively use Adafruit GFX.

160 x 128 display: the coordinates stay in [0 - 159] and [0 - 127].
The first drawRect makes a rectangle on the lower half of the display, from Y=116 to Y=127.
The second makes a rectangle on the top half, from Y=0 to Y=115.

What does "and a clear box is drawn" mean?

For text, use the GFX functions:

void setCursor(uint16_t x0, uint16_t y0);
void setTextColor(uint16_t color);
void setTextColor(uint16_t color, uint16_t backgroundcolor);
void setTextSize(uint8_t size);
void setTextWrap(boolean w);

and

TFTscreen.print("12345678901234567890123456");

OK thanks that clears it. Is there a tools to do the calculations??