String question
807600Oct 18 2007 — edited Oct 18 2007Hi, I was wondering how to display a string in a jPanel. I've tried using a JLabel, but I've been unsuccessful in printing out my line of string. This is one of my attempts:
JLabel winnerText = new JLabel("Winner");
winnerText.getText();
I'm not really sure if this is the way to do it, but I couldn't find anything better in the java documentation.