sclass JChatConvo extends SingleComponentPanel { JLabel label; L posts = synchroList(); // params = contents, right, contents, right, ... *(O... params) { for (int i = 0; i+1 < l(params); i += 2) addPost(strUnnull(params[i]), isTrue(params[i+1])); setComponent(withMargin(label = jTopLabel())); onResize(label, r update); } srecord Post(S html, bool right) {} selfType addPost(S html, bool right) { posts.add(new Post(html, right)); update(); this; } void clearPosts { posts.clear(); update(); } void update swing { if (label == null) ret; setText(label, hhtml(htmlForJLabel_chatConvo_table( cloneMap(posts, p -> pair(p.html, p.right)), label.getWidth()))); } }