Norm Radder wrote:. . . I don't currently know of a component that does that. . . .
As far as I remember, you can put basic HTML tags onto a JLabel. There are ways to get a terminal to show bold or underlined text, but that is complicated and I can't remember how to do it, and it is platform‑specific.
Remove the keywords public and static from the code you showed. The error message might go on about non‑static and it makes people think the answer is to mark something static. But the correct solution is to remove the code using it from a static context.
And welcome to the Ranch