Need help with text position (solved)

This part from your code


void drawBox(String title, int x, int y, int w, int h, String… keys) {
fill(50);
stroke(200);
rect(x, y, w, h, 10);
fill(255);
textSize(14);
text(title, x + 10, y + 25);

textSize(12);
for (int i = 0; i < keys.length; i++) {
String val = data.containsKey(keys[i]) ? data.get(keys[i]) : “—”;
text(keys[i] + ": " + val, x + 10, y + 45 + i * 20);
}
}

This line change text position change 10,25 values see what happens


text(title, x + 10, y + 25);

This line change the text result position of
void drawBox(String title, int x, int y, int w, int h, String… keys) {

Change 10 and 45 see what happens

text(keys[i] + ": " + val, x + 10, y + 45 + i * 20);