1 Reply Latest reply on Oct 19, 2007 1:48 AM by 807600

    String question

      Hi, 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");

      I'm not really sure if this is the way to do it, but I couldn't find anything better in the java documentation.
        • 1. Re: String question
          Please ask swing related questions in the Swing forum. To answer this question you need to understand placing one component on another component, setting text,... What you really need to do is to go through the java swing tutorials. Otherwise you will be stumbling painfully from one question to another.