JOptionpane is removing spaces in the message displayed??

Hi
I am trying to display a message having so many spaces in between.
But the JOptionpane.showMessageDialog() is removing unnecessary spaces from the message.
I tried using HTML formatting to retain the spaces. Even this did not help.
Here is my code:
File outFile = new File(outFileNameWithoutExt+".OUT");
                    read = new FileReader(outFile);
                    buffRead = new BufferedReader(read);
                    //read first line from .OUT file
                    String str = buffRead.readLine().trim();
                    //read and discard .OUT file data until we find "CALCULATED GEOMETRY"
                    while(!str.equalsIgnoreCase("CALCULATED GEOMETRY"))
                        //read the subsequent line from .OUT file
                        str = buffRead.readLine().trim();
                    //read and discard the empty line
                    buffRead.readLine();
                    StringBuffer calculatedGeometry = new StringBuffer();
                    //read first line in calculated geometry info
                    str = buffRead.readLine();
                    //read until we find an empty line
                    while(!str.isEmpty())
                        //append the calculated geometry info and new line character
                        calculatedGeometry.append(str+"<br>");
                        //read next line
                        str = buffRead.readLine();
                    //display the calculated geometry info
                    JLabel jbl = new JLabel("<html><p><code>"+"CALCULATED GEOMETRY :<br><br>"+calculatedGeometry.toString()+"</code></P></html>");
                    JOptionPane.showMessageDialog(null, jbl , "Calculated Geometry Information", JOptionPane.PLAIN_MESSAGE);Is anything wrong in my code??
Please help.

My suggestion is to use JTextArea insteadof JLabel and out your text in formatted way in JTextArea by enabling html.
Yoou can try this JLabel jbl = new JLabel("<html><body><p><code>"+"CALCULATED GEOMETRY :<br><br>"+calculatedGeometry.toString()+"</code></P></body></html>");all the bset

Similar Messages

  • Want to customise the message display by adding extra text in Logon Help forgot password link

    Dear All,
      I am implementing Forgot Password functioanlity or link in my Portal ( SAP EP7.0).I am getting "Logon Problem ? Get Support " link in my Portal welcome page.When I am clicking this link ,I am getting pop up asking me to enter user id and mail id.Everything is working fine.
    But my real concern is I want to customise the message display in case wrong user id or mail id or wrong question answer.
    The current message displaying as "User information incorrect. Cannot send e-mail with new password" and I want to display it as
    "User information incorrect. Cannot send e-mail with new password ,Please contact your Administrator"
    If I will tell in one sentence ,I want to customise the message display by adding extra text
    For example: "User information incorrect. Cannot send e-mail with new password"
    Requirements:"User information incorrect. Cannot send e-mail with new password ,Please contact your Administrator "
    Kindly help em out  how to do it ................
    Thanks,
    Sanjay Mohanty

    Hi,
    Until you have only played around with the layout of the logon page and not the actual code then you will be able to use this property. There are bits of code in the logon par which retreives these values.
    For eg you can see the below if statement in the logon page to determine if logon help has to be displayed. This is part of standard logo page so if you have not removed this in your custom one everything should work just fine.
    <% if ( logonBean.getLogonHelp() ) { %>
    Also check this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/45/7e6313d8780dece10000000a11466f/frameset.htm
    Regards,
    Vijith

  • HT5704 after updating to ios 6.1.3 seems my factory unlocked 3gs is not working, i cant even restore..the message displayed is "itunes software update server cannot be contacted" 'm using latest itunes with winows xp system...........please please help me

    after updating to ios 6.1.3 seems my factory unlocked 3gs is not working, i cant even restore..the message displayed is "itunes software update server cannot be contacted" 'm using latest itunes with winows xp system...........please please help me

    There is no such thing as a "Factory Unlocked iPhone "
    They are either locked to a carrier who may at some stage offer unlocking
    or sold direct to a user by Apple (from their own Stores or online .)
    Those iPhones are NOT locked
    Where did you get your iPhone
    If from Apple try this
    http://support.apple.com/kb/HT1808

  • How to remove xmlns="" from the message

    some reason on the header node in the below message gets xmlns="" when the message is generated from BPEL.
    below is the output that generated. I want to remove xmlns="" from the message.
    <?xml version="1.0" ?><ProductMovementReport xmlns="urn:cidx:names:specification:ces:schema:all:4:0" Version="4.0">
    <Header xmlns="">
    <ThisDocumentIdentifier>
    <DocumentIdentifier>42519</DocumentIdentifier>
    </ThisDocumentIdentifier>
    <ThisDocumentDateTime>
    Can anybody help me please ?

    It's is missing my blog article :-)
    Here it is:
    <?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="comment()|processing-instruction()|/"><xsl:copy><xsl:apply-templates/></xsl:copy></xsl:template><xsl:template match="*"><xsl:element name="{local-name()}"><xsl:apply-templates select="@*|node()"/></xsl:element></xsl:template><xsl:template match="@*"><xsl:choose><xsl:when test="name() != ''xmlns''"><xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute></xsl:when></xsl:choose></xsl:template></xsl:stylesheet>';

  • How to remove space below the table in smartforms

    how to remove space below the table in smartforms

    maintain a loop counter for item say count
    and in text editer write
    if count > 6
      new-page.
    endif.

  • My friend has an apple iphone 4s, He could not make the ID on icloud, becase at the end of ID creation procedure, the message displayed, " the free icloud ID is not eligible for this device"  what is the solution, thanx

    My friend has an apple iphone 4s, He could not make the ID on icloud, becase at the end of ID creation procedure, the message displayed, " the free icloud ID is not eligible for this device"  what is the solution, thanx

    Your friend will have to create his iCloud account on a different iOS device.  His device has already created the maximum number of iCloud accounts and cannot create another one.

  • Adobe CS 5.5 Photoshop error I get the message "display driver stopped responding".

    I just purchased and installed Adobe CS 5.5. I launched Photoshop and when I tried to view an image photoshop crashed and I get the message "display driver stopped responding". I couldn't do anything after that. I have HP elitebook laptop, not sure if that makes a difference. Please advise and what I can do to fix the problem.

    Go to the HP site and update your graphics driver:
    HP Support, Drivers, Contact and Help Forums | HP® Support

  • HT1414 My iPhone4 (iOS 6) does not sync with iTunes. The message displayed suggests to return the iPhone to factory settings (which I cannot do). This happened after the iPhone was upgraded to iOS6 and performed one sync. Any ideas?

    My iPhone4 (iOS 6) does not sync with iTunes. The message displayed suggests to return the iPhone to factory settings (which I cannot do). This happened after the iPhone was upgraded to iOS6 and performed one sync. Any ideas?

    Lilasil wrote:
    The message displayed suggests to return the iPhone to factory settings (which I cannot do).
    Why not?

  • SQLException in the audit log for the Message Display Tool

    Hi
    I´m newbie in PI Technology, and i have some issues when i try to do the next.
    This is the scenario:
    I need to communicate two systems, for one side i have SAP, and for the other side i have ADI (legal system) so, i use PI to do this (the communication), PI receive the data from SAP by means abap proxy, until this everything is correct, then i do the mapping of the data and i send a message to ADI (with the SAP XI Runtime Workbench) by means JDBC adapter, if i check the sended message with "Message Display Tool" show that the message was sent (status "Delivered") but if i check the received messages option, in the audit log displays the five next errors:
    Error: Could not execute statement for table/stored proc. "FADIA4" (structure "StatementFADIA4") due to java.sql.SQLException: FADIA4 in FILEMET not valid for operation.
    Error: JDBC Message processing failed, due to Error processing request in sax parser: Error when executing statement for table/stored proc. 'FADIA4' (structure 'StatementFADIA4'): java.sql.SQLException: FADIA4 in FILEMET not valid for operation.
    Error: MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'FADIA4' (structure 'StatementFADIA4'): java.sql.SQLException: FADIA4 in FILEMET not valid for operation.
    Error: Adapter Framework caught exception: null
    Error: Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'FADIA4' (structure 'StatementFADIA4'): java.sql.SQLException: FADIA4 in FILEMET not valid for operation..
    if there are somebody that maybe could know what is the problem?, could the problem be the side of the legal system?, because inside of PI when i do the Test Configuration in the Integration Directory, the end of the test is successful.
    Any comment is well received!!
    Thanks,
    Vicman
    P.D. sometimes the error is: java.sql.SQLException: Token ) was not valid. Valid tokens: DAY PATH YEAR LABEL MONTH OPTION RESULT CONNECTION TRANSACTION.
    what does it means?

    Hi Pooja,
    thanks for you quickly response!
    XML sended:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_PgDocVentaECC_req xmlns:ns0="http://gmodelo.com/ECC/enviarCobranza">
       <DT_DatosDeControl>
          <MIDDLEWARE_ID/>
          <QUICK_ID/>
          <INTERFACE_NAME/>
          <MESSAGE_ID/>
          <LOG_ID/>
          <USER_ID/>
          <SOURCE_SYSTEM/>
          <TARGET_SYSTEM/>
       </DT_DatosDeControl>
       <DT_PagoDocVentaECC>
          <VKORG>TVKO</VKORG>
          <VKBUR>TVBUR</VKBUR>
          <VKBUR1>TVBUR</VKBUR1>
          <ROUTE>TVRO</ROUTE>
          <ROUTE1>TVRO</ROUTE1>
          <BLART>Q</BLART>
          <BELNR>100</BELNR>
          <WRBTR>200</WRBTR>
          <LFART>100</LFART>
          <VBELN>100</VBELN>
       </DT_PagoDocVentaECC>
    </ns0:MT_PgDocVentaECC_req>
    this is the XML received:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_PgDocVentaADI_req xmlns:ns1="http://gmodelo.com/ADI/recibirCobranza">
    <StatementFADIA7>
    <FADIA7action="INSERT">
    <Table>FADIA7</Table>
    <Access>
    <NUMCIA>123</NUMCIA>
    <NUMALM>234</NUMALM>
    <SUBALM>300</SUBALM>
    <CVETOP>16</CVETOP>
    <FOLOPV>22</FOLOPV>
    <SECOVA></SECOVA>
    <IMPOVA>200</IMPOVA>
    <ALMOVA>5678</ALMOVA>
    <SUBOVA>21</SUBOVA>
    <TOPOVA>21</TOPOVA>
    <FOPOVA>41</FOPOVA>
    <FECOVA>100</FECOVA>
    <STSOVA> </STSOVA>
    </Access>
    </FADIA7></StatementFADIA7>
    </ns1:MT_PgDocVentaADI_req>
    what do you think about it?, anything wrong?

  • How to remove space between the lines

    Hi,
    In my repoprt output I am getting space between the lines. I have changed
    the repeating frame and field -> vertical elasticity and horizontal elasticity to fallowing combinations.
    fixed, fixed.
    variable, fixed,
    expand, variable,
    variable, expand
    Then also I am getting space between the lines of my output.
    Could you help me in this?
    Thanks

    Change the Vertical Elasticity of fields and frames to Variable. If for some fields or frames you don't want to change the vertical elasticity, then remove extra space by adjusting the height of fields/frames.
    Also check repeating frames property 'Vert. Space Between Frames'. Default is 0.
    Hope this helps.

  • Link, as a part of the message displayed

    Hi,
    I need to display a message in my view, using the message manager APIs. This is straightforward.
    But a part of this message needs to be displayed as a link, so that when I click on it, a new window opens up.
    How do I put in this link inside the message?
    Thanks,
    Shalini Mohan.

    hi,Shalini.
    Using Message directly, you can not achieve what you want easily.
    Instead, i thought out one way, you can judge and check whether it can help you a little.
    You don't use the Message manager directly, that means: don't display your message.
    Now, you have one context attribute named "context_msg" which has type "String".
    In addition, you have defined one Link-to-action UI element  which is bound with the context attribute "context_msg".
    When you get the message, use the following
    message e001(ID) with <variable> into lw_msg.
    or if you use Exception class
    lw_msg = lo_exp->get_text( ).
    Then you can set the context attribute "context_msg" with the "lw_msg".
    Now, you can implement your action handler for the action of Link-to-action as you want, i.e. open another pop-up window.
    I don't know whether it can fit your requirement or not.
    Hope it can help you a little.
    Best wishes.

  • How can i change the message display back to full screen from half pane

    after a recent update the message is displayed in the bottom half of the screen. i want to change it back to where the message only opens after double clicking to open it but the options or tools buttons arent there to do this.

    Press F8 to turn the message pane off.

  • ICAL seems to be in a loop.  I cannot add a new appointment; I get the message displayed at the top of the screen "updating"  My Iphone 5s and my MacBook Air are syncing.  All 3 devices are on iCloud.

    ICal is frozen, cannot post new appointments.  I can post appts on Mac Air and Iphone 5s...they are syncing thru Icloud but the MacBook Pro is stuck.  I get  the message updating...that has been going for several hours.  How can I reset ICal?  I have already forece-quit, shut down, and closed...none seem to clear the problem.

    When you next have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Scroll back in the log to the time you noted above. Select any messages timestamped from then until the end of the episode, or until they start to repeat. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How to remove spaces in the output of an PL/SQL report

    Hi,
    The requirement is to develop a SQL report.
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings.
    So, how can I remove the additional blank line between the headings and the data.
    Thanks in advance
    Mani

    Mani B wrote:
    Hi,
    The requirement is to develop a SQL report.From which tool ur getting this report...? From oracle forms report..?
    >
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings. if u use any third party tool like pl/sql developer or sql developer then u can export the data into xcel file.
    Sen

  • ITunes says that my iPod cannot be synced because I'm out of space, but the capacity display at the bottom shows I have plenty of space.

    This image shows what's wrong. iTunes says that I need 1.74 GB more to sync, but the display at the bottom clearly shows that this isn't the case; it's the breakdown of storage on my iPod after a sync. What can I do?
    iPod touch 4th gen running iOS 5.0.1.

    It means you try to sync an amount of content to your iPod Mini that exceeds for 4 GB, or the amount of space that is available on the iPod.  See this article for more details.
    How to sync music to your iPod when your library is bigger than your iPod storage space
    B-rock

Maybe you are looking for

  • How can I retain the re-writted mail from thunder bird

    Recently our mail server changed to Office 365 from Mithy server. Unfortunately when our It team changing the setting, my inbox got re-writted and I lost all old mails. Kindly let me know, if there is any possibilities to retain those deleted mails..

  • OS 10.4.11 FTP Permissions set to 640 on Upload

    I have a G4 in my classroom running OS 10.4.11 (not OS X Server) with Personal Web Sharing and FTP turned on. My students upload web pages to it over FTP. Whenever they upload a NEW file, permissions get set to 640 on the server. Of course this preve

  • New arrayCollection not by reference

    I know I can make a copy of an ArrayCollection with ObjectUtil.copy  or  writing byte array and registering the type. But what happens if you take the source of an existing ArrayCollection, the Array itself, and create a new array? Is it unreferenced

  • FaceTime doesn't work anymore

    Hello everybody ! I have got a problem with FaceTime : I own a MacBook Air 2011, with Lion 10.7.4, and everything worked perfectly before ! So, when I run Skype or PhotoBooth, the green light is there, but there is no video, only the loading sign tha

  • Customizing SSAS drill through action

    Hi eb Is there an easy way to customizing SSAS built in drill through action? For example adding an export to excel option or exposing some of its fields as filters? Of course a reporting action comes in to mind but i was wondering if there was any t