How to create a multiple line label?

Hi,
I need to set a multiple line label. If I enter the following code:
strTitle = "<html><body><b><font color=red>The first line,<br>";
strTitle = strTitle + "the second line.</font></b></body></html>";
jLabelTitle.setText( strTitle );
I can see a two line label. However, with such code, if I go to the UI editor for that frame, the jdev immediately crashed. I am using jdev 9i_902. If I go to UI editor for any other frames without such code, everything is fine, no problem at all.
Can anybody explain why? Is there other way to create a multiple line label?
Thanks!
Harvey

Harvey - I have reproduced this in the production and the latest build. I have logged bug 2446385 but have found a work around. If
you code:
strTitle = "<html><body><b><font color=red>The first line,<br>"+"the second line.</font></b></body></html>";
jLabel1.setText(strTitle);
It seems to work ok.
Hpoe this helps and thanks for posting this.
Regards
Grant Ronald
Product Management

Similar Messages

  • How to create a multiple-line TextBox in a jfx script?

    How to create a multiple-line TextBox in a jfx script?
    Or
    How to use the Swing component JTextArea in a jfx script?
    Please post a brief code segment.
    Thanks,
    Asghar

    This supports two way binding between JavaFX and Java and also cut and paste.
    Enjoy.
      * MyTextArea.fx
      * Created on Dec 14, 2008, 7:23:49 AM
    package twifxer.components;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.Font;
    import javafx.ext.swing.SwingComponent;
    import javax.swing.JComponent;
    import javax.swing.JTextArea;
    import java.awt.Color;
      * @author Steven Herod
    public class TweetTextComponent extends SwingComponent{
         var myComponent: JTextArea;
         public var length: Integer;
         public var readText:String;
         public var text: String on replace{
             myComponent.setText(text);
         public var toolTipText: String on replace{
             myComponent.setToolTipText(toolTipText);
         public override function createJComponent():JComponent{
             translateX = 15;
             translateY = 5;
             var f:Font = new Font("sanserif",Font.PLAIN, 11);
             myComponent = new JTextArea(4, 33);
             myComponent.setOpaque(false);
             myComponent.setFont(f);
             myComponent.setWrapStyleWord(true);
             myComponent.setLineWrap(true);
             myComponent.addKeyListener( KeyListener{
                 public override function
                 keyPressed(keyEvent:KeyEvent) {
                     if (keyEvent.VK_PASTE == keyEvent.getKeyCode())
                         myComponent.paste();
                 public override function
                 keyReleased( keyEvent:KeyEvent) {
                     var pos = myComponent.getCaretPosition();
                     text = myComponent.getText();
                     myComponent.setCaretPosition(pos);
                 public override function
                 keyTyped(keyEvent:KeyEvent) {
                     length = myComponent.getDocument().getLength();
             return myComponent;
    }

  • Create a Multiple-Line JButton Without Using HTML format

    I used html format for multiple-line JButton and it took a long time to load that button up (about 5 seconds more). Does anyone know how to create a multiple-line JButton without using html?
    Any suggestion or sample code will be appreciated.
    javamesser

    Hello,
    You could try using the following:
    -give your button some layout (e.g.: BoxLayout.Y_AXIS, or BorderLayout).
    -create the wrapped text in separate JLabels (one line in each label)
    -add your labels to the button
    Advantage:
    this solution does not affect the laf classes
    Disadvantage:
    focus rectangle is not calculated accurately
    Regards,
    G

  • How to create a new line in label in Xcode

    How to create a new line in label. for example I have two buttons & one label. when i press first button, l want to change the label text to "Hello World". then when I press the second button, on the same label I need to display"Good Bye" on the next line in xcode 5?
    I want to display the lablel like below:
    Hello World
    Good Bye

    I am using Xcode to develop an app for iOS.
    I tried using multi-line label & belwo is my code.
    - (IBAction)change:(UIButton *)sender {
        self.Screen.text = @"\nHello World";
    - (IBAction)newChange:(UIButton *)sender {
          self.Screen.text = @"\nGood bye";
    everytime when i pressed the button, it replacing the whold lable text instead of adding the second line.

  • How to do the multiple-line String at JList?

    hey everyone,
    i want to create a JList have to display multiple-line string.
    i have use String a="text1"+"\n"+"text2" inside my JList...
    the "\n" change to a sequare box...
    how cum like that.................??
    i need ur kindly helping...

    Because the default renderer for a JList element is a
    JLabel, and that is how JLabel behaves. The question
    "how to do a multiple-line JLabel" has been asked
    hundreds of times in this forum, search for that.i have search for it already but i no get it..anything!
    so, can u give me the url for me? thank you!

  • How to create a muli line text area using JavaFx

    Hi all,
    Since the preview SDK does not contain TextArea any more, I am wondering how to create a muli line text area using JavaFX. The behaviour of this text area/field should be somehow similar to JTextArea in Swing or StyledTextWidget in SWT.
    Does JavaFX have any support for this? What would be a sensible approach to create such a widget?
    Thanks for your suggestions,
    br michael

    This is a pretty old thread (I know I came across this while searching for something similar recently), but I figured I'd throw this out there in case other people might find this useful. As I write this, JavaFX's latest version is 1.3... which may have added the needed functionality since the last post.
    You can now create a multi-line text area using a TextBox and by specifying the nubmer of lines and setting the "multiline" value to true. It may not offer all of the same functionality as JTextArea, but it did the job for what I needed... newlines by pressing enter, scrollbar if text surpasses height, etc.
    Here's a simple example:
    Group {
       content: [
          TextBox {
             text: "This is a multi-line textbox"
             lines: 10  // <-- this may/may not be necessary depending on your situation. Default is 5.
             multiline: true
    }Edited by: loeschg on Jul 29, 2010 2:59 PM

  • How to handle the multiple line items in the Inbound idoc FM

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

    Hi ,
    Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
    Thanks in Advance,,,,
    Regards,
    Bharani

  • Itunes - how do i select multiple line items not in sequence ?

    itunes - how do i select multiple line items not in sequence ?

    Hold down the Command key and click each in succession.
    To extend the selection across items that ARE contiguous, use the Shift key.

  • How to create a multi-line table/column comment

    Can someone tell me how to create a multi-line table or column comment?
    Apparently, the concatenate operator (||) does not work with the COMMENT statement.
    I've searched the Oracle manuals and couldn't find an answer.
    COMMENT ON TABLE sometbl IS 'i would like to break up this comment into several lines in order to improve readability'; Effectively, this is what I'd like to do (but it doesn't work):
    COMMENT ON TABLE sometbl IS
      'i would like to break up ' || CHAR(10) ||
      'this comment into several lines ' || CHAR(10) ||
      'in order to improve readability' || CHAR(10); Oracle version is 10.2.0.4

    Why not just
    SQL> create table t (a int)
    Createtable successfully completed.
    SQL> comment on table t is 'i would like to break up 
    this comment into several lines 
    in order to improve readability'
    Commenton successfully completed.
    SQL> select * from user_tab_comments where table_name = 'T'
    TABLE_NAME           TABLE_TYPE  COMMENTS                               
    T                    TABLE       i would like to break up               
                                     this comment into several lines        
                                     in order to improve readability        
    1 row selected.?

  • How to create the multiple desktops

    Hi,
    Can anybody help me out how to create the multiple desktops in weblogic portal.After creating the desktops how to run them.Can you provide me the any document or send me the solution for it. I will be waiting for the reply.Thanks in advance..
    Thanks & Regards
    Kalyan Kurmam

    Hi Kalyan
    Please see a post of mine with the info you want and some additional information on what exactly Desktops and Portals are. Hope this helps.
    Re: Portals vs Desktop
    Thanks
    Ravi Jegga

  • How to create curve fitted line chart?

    Line chart is formed with straight lines, but how to create curve fitted line chart?

    Jasper wrote a blog on curve fitting charts

  • HELP! PDF objects - How to create a program line object?

    Hi Experts,
    I would like to know how to create a Program lines object (icon cog wheels). I need to create additional coding inside the context tab but when I try to right click on a folder --> create -->graphic,address,text,alternative...single record... No
    program lines can be created.
    Hope someone could help me.
    Thanks,
    Jeff

    There are two ways of doing it, depending on what you want to accomplish. Both require that you edit the file ~/.bashrc (I assume you use bash)
    1) If the application places all the executable files in a given directory (let's say /opt/Application/bin/), you can access all those executables directly by simply telling your shell where to look (in the same way the shell automatically looks for executable files in eg. /usr/bin). In ~/.bashrc, you would have to add a line that looks like this:
    PATH="$PATH:/opt/Application/bin"
    2) If you just want to make a traditional "shortcut" that executes a given command, this can be done with alias. Add this command to your ~/.bashrc:
    alias shortcut="some command"
    In this case, typing shortcut into a terminal will be interpreted just like if you had typed some command instead.
    In order to try out these changes, either restart your terminal or run this command:
    source ~/.bashrc
    [EDIT]
    I was obviously beaten to it
    Last edited by Peanut (2009-05-26 23:12:47)

  • How to create a stroked line that randomize each stroke color?

    Hi all, I am strating out designing in illustrator and I need help on how to created a stroked line, -----------, with each stroke (  -  )  a different colour, like, each stroke having a different randomized color which differs from the next one.
    Also, I need help on how to mask out parts of a template given to me by my school so i dont infringe that boundary when I add my lines to it. All helps appreciated, thank you.

    Ok thank you for your responses, Monika, I followed your instruction but it isnt working, is there any steps that I might have done wrongly? Here are some screenshots that depicts my problem:
    Here it is after I outline the stroke,
    And here it is when I apply the script:
    However, after I clicked okay, nothing changed and the strokes are still in their original color(yellow) as seen in the first picture. Did I do any steps wrong that result in this outcome? Also I've tried to put 99 instead of 99s and still, it didnt work.

  • How to put multiple lines label to a button

    I found out that the default for creating a button label is one-line setting. How can I make multile lines if the label is too long?

    forgot the url,
    http://java.sun.com/docs/books/tutorial/uiswing/components/label.html

  • How do you type multiple lines on a path? (label for top slope of bottle)

    Ill describe the best I can...
    I am making a label that will wrap around the top half of a bottle, the part that slopes to the spout.  Because of this, the label is actually shaped more like an arch so when it goes onto the bottle, it will look more straight.  The top part of the label of course will be a tighter arch than the bottom half.  This is part of why its hard to make things look right.  I know I can bend a line at the same angle and type on it and it looks right but I have a paragragh I have to do this with, about 5 lines worth.  I dont want to have to make a different path line for each one because that would be a nightmare to get each line perfect with each other.  Is there a way to do the "type on a path" to work with multiple lines at once?

    Scott Falkner wrote:
    You can't. Each line of text requires an explicit path. You could draw the top line and the bottom line, then make a three-step blend between the two. Expand the blend then link the paths so that text from path 1 flows to path 2, and so on. In the example below each path is linked to the one below. I only needed to paste text into the top path. I was able to link to each following path by clicking on the red + at the end of the previous path, then clicking on the path below.
    You could also design the label flat and use a distortion envelope or Warp effect to bend it. This is how I have done such labels in the past. That method requires more experimentation, but makes edits easier.
    That seems to be something that might work out.  How do you separate each of the strokes from the blend to make them typable though?

Maybe you are looking for

  • What is my iPad's MAC Address?

    My household network only allows known (registered) MAC addresses to transceive through the wireless router. How do I obtain the MAC address for my new iPad so that I can enter it into the router's table of allowed devices? Why wasn't the MAC address

  • Count/max query

    Hi i have a table with about 60 million rows and growing.(10gR2 linux x86) a query of the max value and the count number of rows in the table takes at least 30 seconds even when doing a fast index scan. is there any way to do things better ? 10x, dor

  • Business Objects Enterprise XI 3.1

    Dear all, Where can I get the Business Objects Enterprise XI 3.1 ? Thank you Christophe

  • Permission Denied when calling a method from VB using WebLogic 8.1.2 JCOM

    Hi, We are calling an java/ejb methods from VB using WebLogic JCOM 8.1 SP2. But using JCOM, we are getting a error Permission denied when called from VB. We think that we should update pathch jintegra 2.0 or 2.1 in WebLogic 8.1.2 the to solve this is

  • Ihpone 5 Touch screen unresponsive when charging

    I noticed my screen became Unresponsive and behaving erratically while it was charging. The charger is an Apple OEM charger. If I unplug it from the phone the screen begins to work normally again.