as the title says: I need to fit a JLabel into a JFrame, but the text in the JLabel are too long, so I need to add some linebreaks. The text in the JLabel are obtained from an online XML file, so i cant just change the text to contain linebreaks.

This code extracts data from the XML-file

Element element = (Element)nodes1.item(i);
            String vær = getElementValue(element,"body");
            String v = vær.replaceAll("<.*>", "" );  
            String forecast = "Vær: " + v;

in this case the string I want to add some linebreaks to the string v. The String v contains the parsed data from the xml file. The String forecast is returned and set as a text to the JLabel.

Just ask if something is uncleared, thanks in advance!

Edit
Report