try this, i haven't tested anything, so i'm not sure if it will work, but i'm pretty sure it will
(i changed some stuff, commented, and changed the name of the string to bitStr, just to make sure we don't have a string 'text', hence the instruction name 'text()'
import processing.serial.*;
Serial myPort;
String bits;
PFont font;
String bitStr = "bits: -";
void setup() {
size(800,200);
myPort = new Serial(this, "COM1", 9600);
myPort.bufferUntil('\n');
font = loadFont("TimesNewRomanPSMT-12.vlw");
textFont(font);
}
void draw() {
background(255);
fill(0);
text(bitStr, width/20, 10); // draw text in the draw() loop, then you're sure it will be drawn continuously
}
void serialEvent (Serial myPort){
bits = myPort.readStringUntil("\n"); // here you have to include "\n" as argument of readStringUntil
if(bits != null){
bits=trim(bits);
bitStr = "bits: " + bits;
}
else {
bitStr = "bits: null"
}
}