How can I insert a newline when I am using JLabel.setText()? I tried to use Html but can seem to make it work for setText, only for the initial declaration of the jLabel
the way to do it when initially declaring the jlabel is:
label = new JLabel("<html>Hello World!<br>blahblahblah</html>");
my code:
textString += "<html> quantityTextField.getText() +
theInventory.findItem(UPCTextField.getText()).toString() + <br> </html>";
purchaseInfo.setText( textString);
it displays the html tags and the method names instead of the string returned by the methods