Not sure why line break is not working

Hi all,
Here is part of my simple Swing application:
String text1 = "hello";
String text2 = "world";
String text3 = text1+"\n"+text2;
// have also tried (String text3 = text1+"\n\r"+text2;)
displayField.setText(text3);I supposed that the text3 in the label field (displayField) would display like this:
hello
world
But not, the text3 just displayed in the same line like this instead: helloworld.
I am not sure why the line break is not working.

Use HTML for a multiline JLabel.// String text3 = text1+"\n"+text2;
String text3 = "<html>" + text1 + "<br/>" + text2 + "</html>";db

Similar Messages

  • OutputLabel and line breaks doesn't work - Is there a hack for JSF1.2?

    Hello,
    I use JSF 1.2 and Facelets to generate a form automatically. This works so far well. But if I have a label with line breaks, JSF does not convert the line breaks into �
    � tags. Is there a hack to convert line breaks into �
    � tags?
    A little example
    Code:
    <h:outputLabel value="#{component.label}" for="#{component.id}" />
    <h:inputText value="#{component.value}" id="#{component.id}" />component.label = �First Line\nSecond Line�
    component.value = "UserInput"
    This is rendered to:
    First Line Second Line      [UserInput]
    Instead of:
    First Line        [UserInput]
    Second Line One possible solution is to disable �escape�. But this is a bad solution because there are umlauts and angle brackets (�<�,�>�) in some texts for my labels. Does anyone know a better solution?
    Regards
    Martin

    Hi Raymond,
    thanks for your tip. It is a very good idea. But while testing I have found a little problem. with "pre". JSF renders labels like this:
    <label> <---- notice this line break
    Text</label>All labels start with a line break in the HTML code. So all labels start with a line break in the browser too if I use CSS with the "pre" option :(
    Regards
    Martin
    Message was edited by:
    mwinandy

  • TS1398 I am prompted to provide password and I put it in. Join then it tells me I am unable to connect. Every other iPhone/iPad/laptop works fine. Not sure why this phone doesn't work.

    Just trying to access my wifi using my iphone

    Usually it's because you are not making internet connection via wifi.
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
     Cheers, Tom

  • Acrobat not working

    I just downloaded Creative Suite 6 Design and Web Premium for Windows and the Adobe Acrobat component isn't working. It doesn't open by itself or to open a PDF. InDesign and Illustrator are working fine, so I'm not sure why Acrobat specifically isn't working. What's the problem?

    We can't know. You are not providing system information or other details.
    Mylenium

  • Google Maps Compass Mode is not working ( Neo V )

    I read somewhere in the internet that can be related to a new way how google maps asks the compass info and the old devices (as xperia 2011) don't show the info in the proper vector way.
    Can someone add more info?
    I hope sony fix this problem.

    It's the same here. I just had a look in Google Maps in one of the Xperia neo V's with ICS. The compass is no longer working.
    Not sure why or if it will work again with a new update of the app or the phone. I will post again if I find more information.
    What do you think about this forum? Let us know by doing this short survey.

  • WebEdit Not Working, receiving Log In page in MS App

    Hi All, Our WebEdit doesn't seem to be working correctly for us. When selecting the WebEdit button for an office document (i.e. Word), the appropriate MS Application will open but tries to render the log in page instead of the actual doc itself. WebEdit is enabled in config.xml and filetypes.xml has WebEdit enabled for MSWord. Thought that KB Article DA_310386might apply so I changed the WebDav gateway switches to false but problem still exists. Issue applies to all docs and all users. This is in our 5.04 production portal with Collab 4.0 and Content 6.0. Any ideas?
    Jason Scarano

    My first guess would be because Firefox disabled insecure TLS fallback in 37.
    We have disabled insecure TLS version fallback. If a secure site isn’t working, you can try setting the “security.tls.version.fallback-limit” preference in about:config to 1 and see if it works then.
    Weblogic out of the box does not use the newest protocols and is version intolerant.  I would need detailed config info to say for sure why PORTAL might still be working.  Are they running different Java versions for Weblogic?  Is there a mix of Certicom and JSSE being used for SSL?  Check out this analysis for more details.
    http://remotepsadmins.com/2015/01/24/ssl-weblogic/
    Let us know what you find.  Others may experience the same thing if they are configured similar to you.

  • Push notification not working in Mail on 3GS after iOS4 update

    My auto notification of email has stopped working on my 3GS after I updated to iOS4. I have a MobileMe subscription and it works fine on my G5, MacBook Pro and iPad.
    Not sure why it is refusing to work on my iPhone 3GS. Is anybody else experiencing this issue?

    1. Settings > General > Reset > Reset Network Settings
    2. Bite the bullet - Restore as new without using a backup (which may have corrupted data/settings.

  • Error in line break in a file adapter

    Hi,
    I have a problem with a file receiver adapter. In File Content Conversion I put 'nl' in the endSeparator parameter but when I see the "output.txt" file generated all data are put in same line separated by rectangular characters.
    I think this rectangular characters are the line breaks characters. My problem is that the target application don't recognized those rectangular characters like line breaks.
    Also i tried to put in endSeparator the ASCII character '0x0A' but the line break neither work.
    In file Encoding parameter I tried with every charset encodings like: US-ASCII, ISO-8859-1, Windows-1252... but the line break don't work.
    Could be important the operating system over XI is running? SAP and XI is running over a AS400 system.
    Thanks in advance for any reply.

    Hi Prashanth,
    Thanks for reply.
    I Tried with UTF-8 and it doesn´t work.
    I tried with almost all known charsets but none of them work. The line break doesn't appears.
    I want write:
    line1
    line2
    line2
    If i open the notepad in the file appears:
    line1&#8301;line2&#8301;line3&#8301;...
    The target application doesn't recognized the &#8301; character like a line break.
    but if i copy the text of file and i put it in a doc file or in this forum, for example, the line break appears.

  • Not sure why Message is not working on my ipad.

    Not sure why message is not work on my iPad. It works find on my iPhone.

    http://support.apple.com/kb/TS2755

  • Since iOS 7.1 my phone won't turn on and is asking me to connect to iTunes. I connect to itunes and it says it needs to be restored. Not sure why. I try to restore it and then it says something went wrong and it won't work. So I've been without my phone

    Since iOS 7.1 my phone won't turn on and is asking me to connect to iTunes. I connect to itunes and it says it needs to be restored. Not sure why. I try to restore it and then it says something went wrong and it won't work. So I've been without my phone for a couple days now. It gives me error code (29). The phone almost reboots and then 3/4 of the way through it gives me the error message.

    If using windows...
    Temporarily disable your firewall and antivirus software and try again...
    http://support.apple.com/kb/TS1379
    See iTunes Connection Issues here...
    iTunes for Windows: Troubleshooting security software issues
    NOTE:
    Make sure you have the Latest Version of iTunes (v11.1.5) Installed on your computer
    iTunes free download from www.itunes.com/download

  • I received a text today while at work about iCloud keychain verification code. I have not signed up for it or anything that uses it. I work out of the city with limited internet access so not sure why I would be getting this. Is my info safe??

    I received a text today while at work about iCloud keychain verification code. I have not signed up for it or anything that uses it. I work out of the city with limited internet access so not sure why I would be getting this. I only got this number about a month ago. Apparently someone else had the number before because I get texts from his family members wondering whats going on. I got one yesterday and the person didn't seem to thrilled that the number was cutoff and today I got 2 texts about iCloud Keychain which I don't even know what it is. Seems suspicious to me. If the person who use to own the number is doing it he should know it is not his number anymore because he obviously didn't pay his bills.  I'm not too sure about iCloud Keychain so just want to know my info safe?? It says it can store credit card numbers which is what gets me worried. Frankly I think it's pretty stupid to save that kind if information with any kind of app. But I don't want some random person trying to access my personal information because they are bitter they lost their number.  Please let me know as soon as possible so I can change passwords or anything that is needed.
    thanks

    If it were me, I would go to my carrier and get a new number. Since you have only had it for a month, the inconvenience would be minimal.
    Barry

  • TS3074 Hello anyone with Windows 7, not sure why having followed instructions above, install of latest version of itunes won't work and can no longer open old version either.  anyone help with this?

    Hello anyone with Windows 7, not sure why having followed instructions above, install of latest version of itunes won't work and can no longer open old version either.  anyone help with this?

    Hi,
    thanks for your reply.
    Yes, except n°1 - empty Temp directory, I had tried/checked all of those.
    I emptied the local temp folder tonight, but it still won't work.
    Please note: the installation doesn't give me any problem. The program was working fine, until at one point *plouf* it stopped working. I can re-install it without any problem, it just crashes when opening.
    \\edit\\ I seem to have located the problem, it's in the library files. If I re-install iTunes without my library, it works fine (though there is no music in it, yet). As soon as I import my library, or replace the My Music\iTunes folder with the old one, it stops working.

  • Line breaks (%0a) not working in pre-populated mailto links?

    Anyone else having this problem?
    I'm using mailto links in my folio that include "subject" and "body" information, so that when the user clicks on the link, it opens a prepopulated email that is ready to send.
    Unfortunately, the line breaks (%0a) are not working, so a nicely formatted email with a couple paragraphs and a signoff at the bottom is turning into one long string of text.
    The weird thing is, every other special character (e.g. %20 for spaces) is working just fine.
    For example, here's a mailto link I might use:
    mailto:test%40test.com?subject=subject%20test&body=Here's%20my%20first%20paragraph.%0A%0AH ere's%20my%20second%20paragraph.%20There%20should%20be%20a%20full%20break%20before%20and%2 0after.%0A%0ASincerly%2C%0AiPad%20email%20test
    Every character will work just fine except for the %0A%0A portion of the code.
    That is going on?

    You have to edit the XML Source code to do this. First, put a value in the object tab > value tab > Default box so that you can find it easily in the XML code. Click on the field to select it, then click on the XML Source tab. This will take you to the first line in the XML code that defines the field. Then all you need to do is insert:
    &#xD;
    wherever you want a carriage return. This will also overwrite the value when data is typed into the form and saved. FYI, the reason your values aren't kept when you script in the default value is that the script is still in the form when you save it, so re-opening the form simply resets the default value to the script.

  • Decode does not work for line breaks

    Hi experts,
    In a BLS, I am decoding a string which I output .  It decodes the spaces but not for linea breaks.  What is wrong ¡?
    Thanks and best regards,
    Antonio Rodriguez  Rubalcaba

    Jeamy, 
    I forgot the examples .
    Best regards,
    NOTE
    Note : Copying and pasting the text into the note pad shows no problem ( it has linebreaks ) . This is also true when I copied the decoded thext from the INFO section of the Transaction execution onto this message . However , the BLS OUTPUT does not have line breaks .
    UNDECODED TEXT EXAMPLE
    I use the following expression : "Text = " & IllumSQLQuery_0.Results{/Rowsets/Rowset/Row/NOTA} and I get the following :
    INFO : Text = REPRESENTACION%20NUEVO%20LAREDO.-%20SE%20RECIBE%20LOTE%20DE%20GAS%20DE%20IMPORTACION%20POR%2015%2C000%20BLS.%20FLUJO%20DE%20RECIBO%201%2C322%20BPH.%20%0D%0AINICIO%20EL%20RECIBO%20AYER%20A%20LAS%2023%3A50%20HRS.%0D%0A%0D%0AREPRESENTACION%20CADEREYTA.-%20EXISTENCIA%20BOMBEABLE%2010%2C000%20BLS.%0D%0A%0D%0ATDGL%20POZA%20RICA.-%20EXISTENCIA%20BOMBEABLE%206%2C000%20BLS.%0D%0A%0D%0ALPG%20DUCTO.-%20SE%20PRESENTO%20FALLA%20EN%20LA%20ESTACI%D3N%20NO.%204%20DE%20REBOMBEO%20SUSPENDIENDO%20EL%20FLUJO%20DEL%20LPG%20DUCTO%20DE%20LAS%2004%3A50%20A%2005%3A05%20HRS.%0D%0A%0D%0AB/T%20ANAFI.-%20ARRIBO%20EL%2010.02.2011%20A%20LAS%2006%3A00%20HRS.%20PARA%20DESCARGAR%2020%20MTM%20DE%20AMONIACO%20EN%20LA%20TDGL%20TOPOLOBAMPO%2C%20SE%20ENCUENTRA%20FONDEADO.%0D%0A%0D%0AB/T%20GASCHEM%20HAMBURG.-%20CONTINUA%20DESCARGA%20DE%20AMONIACO%20EN%20LA%20TDGL%20TOPOLOBAMPO.%20DESCARGADO%206%2C430%20TM%2C%20POR%20DESCARGAR%208%2C570%20TM.%0D%0A%0D%0AB/T%20BW%20BOSS.-%20ETA%2001.03.2011%20PARA%20DESCARGAR%2046.8%20MTM%20DE%20GAS%20LP%20EN%20LA%20TR%20PAJARITOS.%0D%0A%0D%0ACOATZACOALCOS%3A%20CONTINUA%20EL%20ENVIO%20DE%20BUTANOS%20A%20LA%20REFINERIA%20MINATITLAN.%0D%0A
    DECODED TEXT EXAMPLE
    I user the following expression : "Text = " & IllumSQLQuery_0.Results{/Rowsets/Rowset/Row/NOTA} and I get the following :
    INFO : Decoded Text = REPRESENTACION NUEVO LAREDO.- SE RECIBE LOTE DE GAS DE IMPORTACION POR 15,000 BLS. FLUJO DE RECIBO 1,322 BPH.
    INICIO EL RECIBO AYER A LAS 23:50 HRS.
    REPRESENTACION CADEREYTA.- EXISTENCIA BOMBEABLE 10,000 BLS.
    TDGL POZA RICA.- EXISTENCIA BOMBEABLE 6,000 BLS.
    LPG DUCTO.- SE PRESENTO FALLA EN LA ESTACI�N NO. 4 DE REBOMBEO SUSPENDIENDO EL FLUJO DEL LPG DUCTO DE LAS 04:50 A 05:05 HRS.
    B/T ANAFI.- ARRIBO EL 10.02.2011 A LAS 06:00 HRS. PARA DESCARGAR 20 MTM DE AMONIACO EN LA TDGL TOPOLOBAMPO, SE ENCUENTRA FONDEADO.
    B/T GASCHEM HAMBURG.- CONTINUA DESCARGA DE AMONIACO EN LA TDGL TOPOLOBAMPO. DESCARGADO 6,430 TM, POR DESCARGAR 8,570 TM.
    B/T BW BOSS.- ETA 01.03.2011 PARA DESCARGAR 46.8 MTM DE GAS LP EN LA TR PAJARITOS.
    COATZACOALCOS: CONTINUA EL ENVIO DE BUTANOS A LA REFINERIA MINATITLAN.

  • Having trouble adding my Mac Pro Tower to my Apple ID  not sure why it does not work

    Having trouble adding my MacPro Tower to my Apple Id will not allow me to download the music and videos I purchase on my Iphone or IPad... Very frustrated with apple....

    Tank 64 wrote:
    My Daughter changed her Apple ID, not sure why. Then she changed it back to the original. She has lost $50 on her iTunes. How does she restore the funds?
    How did she change her AppleID?
    If she simply updated the AppleID (not created a new one with a new email address), log out then log back into iTunes store.

Maybe you are looking for

  • Itunes doesn't recognize ipod touch even after I download latest version

    About a week ago my ipod touch froze on the apple logo screen. I found a way to reset the factory setting and then try something else (can't remember what it was) where the itunes logo shows up on the screen and you plug it into your computer. After

  • Dates for Infotype

    Dear all I am involved in Implementation . My client requirement is very specific and rare they wanted in IT0022 ( Education ) Instead of Start and End Date they want only the year of Passing to be recorded. Even in IT0023 ( Previous Employment ) The

  • Secure payload in RWB

    Hi All, I am working on payload hiding in Message Monitoring. I followed the SAP Note:1370334. By using this process i am able to hide the payload in message monitoring. But i m unable to edit any objects in ID. I need to to edit the ID objects.Do i

  • LP9 upgrade hangs while reading XSKey

    I have Logic Pro 6 and I'm trying to upgrade to Logic Studio 2 (Logic Pro 9). I have my blue Emagic XSKey dongle which works fine to launch and run LP6. The XSKey shows up under USB in the System Profiler. All looks fine. However, when I run the upgr

  • Flash player 16 don't work on OSX 10.6.8

    I have to use ma with 10.6.8. Flahh tell me to update. Since i update nothing work ! BIG problem