It's amazing that you can use HTML / CSS for Java shortcut styles. There may be several ways to solve this problem, but if you want to use HTML / CSS, here is one way that seemed to work:
pane.setText("<html>" + "<div style=\"text-align: center;\">" + "<span style=\"color: green; text-align: left;\">" + "Eleking02 " + "</span>" + "<span style=\"text-align: center; margin-top: -17px;\">" + "Vs. </span> " + "<span style=\"margin-top: -20px; text-align: right; color: red;\">" + " Nils" + "</span>" + "</div>" + "<br/>" + "<div style=\"text-align: center;\">" + "<font>" + "7" + " - " + "3" + "</font>" + "</div>" + "<br/>" + "<div style=\"text-align: center;\">" + "<font>Gewonnen!</font></html>" + "</div>" + "</html>");

HTML div elements are block elements, which means that they automatically create a new line after each div. You had several Divs, and that would prevent the text you want everything to be on the same line. The span element does the same, except that it does not create a new line after the element. To center the text, I just placed what I wanted to concentrate inside the Div and apply text-align: center. It seemed like a trick.
source share