How to write multiline text

Somebody please tell me how do i write a multiline Text2d/3d in java3d.
Thanks in advance

Anyone manage to solve this ?
Regards,
Oakwd

Similar Messages

  • How to write multiline String in a JLabel

    How can i write a string that is shown in many lines in a JLabel. Or is there any orher way to write them?
    Also, similarly how to write tooltip text that spans across many lines. Not just one line

    import java.awt.*;
    import javax.swing.*;
    public class UseThisTheNextTimeYouFeelLikePostingEelops {
        public static void main(String[] args) {
            String str = "This is \nmy example \nof a multi-line \nJLabel";
            JLabel strLabel = new JLabel (str);
            display(strLabel, "Hmmm...");
        public static void display(JComponent comp, String title) {
            JFrame f = new JFrame(title);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(comp);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • How to Shift Multiline Text in a Picture ??

    Hi All,
    I have written a MultiLine Text in a Picture using "Draw Text at Point" Function. How can I shift (right and left) my first line of the text in the picture without shifting other text lines in the picture ???
    Please help it is very IMPORTANT.
    I am using LabVIEW 2011.
    Thank you so much.

    You can use the Picture to Pixmap VI followed by the Unflatten Pixmap VI to convert the picture to a 2D array. You can now use the array primitives (Array Subset, Replace Array Subset) to move the pixels to where you want them and then convert back to the picture.
    The other alternative, if the picture is newly created, is to just recreate it with the new values.
    Try to take over the world!

  • How to write the text into text objects

    Hi,
    I have one requirements . from the web we get the delivery line item based pallet numbers info with Quntity .
    How to write the line item level pallet information in the the Delivery line items text element "pallet info" .
    Any function module to write the text data into text elements in SAP like READ_TEXT.
    please give your valuable suggisions .
    Thanks &Regards
    Sai.

    Try:
    CREATE_TEXT
    SAVE_TEXT

  • How to write selected text in JTextArea in selected location

    iam using JTextArea ...
    i want to writer selected text in selected location,,,,,,

    use
    JTextArea.getSelectedText() and
    JTextArea.replaceRange(String str, int start, int end)
    methods.

  • How to get multiline text on progress bar

    Hi there,
    I have to use Progress Bar and need to show text in multiline.
    can anyone please suggest me how to achieve that.
    Thanks,
    Prashant

    can u guys figure out what really i am missing here?A spoon-fed solution, I suppose. So enjoy:
    // A JProgressBar with two lines of text.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.beans.*;
    public class PB2Lines extends JPanel implements
                             ActionListener, PropertyChangeListener {
        private TwoLinesProgressBar progressBar;
        private JButton startButton;
        private Task task;
        class Task extends SwingWorker<Void, Void> {
            public Void doInBackground() {
                int progress = 0;
                //Initialize progress property.
                setProgress(0);
                while (progress < 100) {
                    progress += 25;
                    setProgress(progress);
              if (progress==25)
                progressBar.setString("Eggs|added");
              else if (progress==50)
                progressBar.setString("Sugar|added");
              else if (progress==75)
                progressBar.setString("Milk|added");
              else
                progressBar.setString("Everything|done");
                    try {
                      Thread.sleep(500);
                    } catch (InterruptedException ignore) {}
                return null;
            public void done() {
                Toolkit.getDefaultToolkit().beep();
                startButton.setEnabled(true);
                setCursor(null); //turn off the wait cursor
        public PB2Lines() {
            super(new BorderLayout());
            //Create the demo's UI.
            startButton = new JButton("Start");
    //        startButton.setActionCommand("start");
            startButton.addActionListener(this);
            progressBar = new TwoLinesProgressBar(0, 100);
            progressBar.setPreferredSize(new Dimension(200,40));
            progressBar.setValue(0);
    //        progressBar.setStringPainted(true);
            progressBar.setString("Progress|Bar");
            JPanel panel = new JPanel();
            panel.add(startButton);
            panel.add(progressBar);
            add(panel, BorderLayout.PAGE_START);
            setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
         * Invoked when the user presses the start button.
        public void actionPerformed(ActionEvent evt) {
            startButton.setEnabled(false);
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            task = new Task();
            task.addPropertyChangeListener(this);
            task.execute();
         * Invoked when task's progress property changes.
        public void propertyChange(PropertyChangeEvent evt) {
            if ("progress" == evt.getPropertyName()) {
                int progress = (Integer) evt.getNewValue();
                progressBar.setValue(progress);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                   JFrame frame = new JFrame("ProgressBar with 2 lines");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   JComponent newContentPane = new PB2Lines();
                   newContentPane.setOpaque(true); //content panes must be opaque
                   frame.setContentPane(newContentPane);
                   frame.pack();
                   frame.setVisible(true);
      class TwoLinesProgressBar extends JProgressBar {
        public TwoLinesProgressBar(int min, int max) {
          super(min, max);
        private int getXofCenteredString(String s) {
          int ix= getFontMetrics(getFont()).stringWidth(s);
          return (getWidth()-ix)/2;
        protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          int i= getString().indexOf('|');
          String s= getString().substring(0,i);
          int ix= getXofCenteredString(s);
          g.setColor(Color.BLACK);
          g.drawString(s, ix,15);
          s= getString().substring(i+1);
          ix= getXofCenteredString(s);
          g.drawString(s, ix,35);
    }

  • HOW TO WRITE STANDARD TEXT IN LINE LINE

    1)LINE
    2)LINE
    LIKE THIS

    hiii
    if you want to write same in standard text then you just need to press enter you will get second line & you can write there.it will come in next line only..in SO10 you will get the same screen for writing as you hav in SAP script.so new line is also there.or just press enter.& yaa if you want to use outline there then for particular variables or automated data you can use outline type.so number will be generated automaticaly.for this you will get help in help.sap.
    regards
    twinkal
    Edited by: twinkal patel on Jul 7, 2008 10:39 AM

  • Plz help me.....How to write rtf text in a file

    Hi all,
    i m creating a rtftextEditor.. with bold, italic ,underline, strikethroug features... i want to save the text with this attributes in a file but the strikethrough attribute does not save in the file.
    the code for that i write is..
    File file=new File(curFileName);
    OutputStream fo=new FileOutputStream(file);
    rtf.write(fo,doc,0,doc.getLength());
    fo.close();
    so wat can i do now.plz help me
    Regards...

    Sun's RTF package is old and I am not sure they have plan to update it. Many RTF keywords are not handled by the java RTF package. You might want to modify their rtf package. Most of the files in this package are protected, only the RTFEditorKit is public. Look into the src.zip file and check out the RTFGenerator.java file.

  • How to write a text file from Acrobat javascript

    Hi,
    Can anyone help me how to export PDF comments to a text file using javascript.
    Thanks,
    Gopal

    Create a report using the Report object and save as a pdf or text file.
    Generating Reports with JavaScript Dave Wraight Planet PDF Contributing Editor 

  • How to write format text on this forum ?

    I'd like to write my threads using format text, particularly when I write a code fragments.
    I want to obtain something like in this thread: [Survey] Which coding feature do you want in JDeveloper 11?
    Should I write with HTML tags ?

    Sveinn,
    I should use the square brackets:
    [ code ] [ /code ] (without the spaces)
    instead of the angle brackets:
    <code> </code>

  • How to write a text file in Acrobat Javascript?

    I am using acrobat XI I have tried output a text file like this
    var cMyC = "abc"; var doc = this.createDataObject({cName: "test.txt", cValue: cMyC}); this.exportDataObject({cName: "test.txt", nLaunch:0});
    This is working , but I would like to provided a fixed path and no dialog is popup to request the user choose a saving path
    Are there any way to fix the problem? thanks

    Actually, what I am doing is :
    There is action wizard which apply some javascript effect and modify the file one by one in a specific folder,
    And currently I am using PHP to execute command line to run task scheduler,  the scheduler runs a batch program that run the action wizard (named sequence?) so the PDF file is modifed one by one
    Since the batch runs only one time for a folder instead of run each time for a file, I would like to detect whether a file is success or not , so I think of create a text file as detect signal to determine whether the operation is success.
    So , simply, are there any way to check whether a file is success in a batch sequence operation? thanks

  • Hi how to write text file continuosly

    hi i know how to write a text file but if i write something and close the
    whole program, then when i open the program and do the samething,
    i wanna write something contiguosly, write the next line of the very last saved line..
    but..i tried couple of times,but the written sentence just overlapped,,,and
    can't write continuously,,,
    how to solve it............

    Are you saying you want to create a file the first time you run a program, and append to the file the second time? If so, check the constructors for the class you are using to write the file. There should be one that takes a boolean flag telling it you want to append instead of overwrite. Set the flag to true.
    For example:
    http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileWriter.html#FileWriter(java.lang.String, boolean)FileWriter(String fileName, boolean append)
    Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.

  • Write to text file (including spaces/next line) using oracle??

    How to write to text file using oracle? And how do I handle spaces/next line? (i was trying to use spaces(ch(32)), however it is just converted into squares in the text file.) thanks!

    989873 wrote:
    How about tabs?It does not matter what character it is. UTL_FILE deals correctly with any text file. Tabb is CHR(9):
    SQL> declare
      2       v_file utl_file.file_type;
      3       v_total_rec number := 0;
      4       v_total_sal number := 0;
      5  begin
      6      v_file := UTL_FILE.FOPEN('TEMP','TEST.TXT','w');
      7      for v_rec in (select * from emp) loop
      8        v_total_rec := v_total_rec + 1;
      9        v_total_sal := v_total_sal + v_rec.sal;
    10        UTL_FILE.PUT_LINE(
    11                          v_file,
    12                          lpad(v_rec.deptno,2) || chr(9) || rpad(v_rec.ename,14) || chr(9) || to_char(v_rec.sal,'99999D99')
    13                         );
    14      end loop;
    15      UTL_FILE.PUT_LINE(v_file,'Total Salary:' || chr(9) || v_total_sal);
    16      UTL_FILE.PUT_LINE(v_file,'Total Records:' || chr(9) || v_total_rec);
    17      UTL_FILE.FCLOSE(v_file);
    18  end;
    19  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2       v_file utl_file.file_type;
      3       v_line varchar2(100);
      4  begin
      5      v_file := UTL_FILE.FOPEN('TEMP','TEST.TXT','r');
      6      loop
      7        UTL_FILE.GET_LINE(v_file,v_line);
      8        DBMS_OUTPUT.PUT_LINE(v_line);
      9      end loop;
    10    exception
    11      when no_data_found
    12        then
    13          UTL_FILE.FCLOSE(v_file);
    14  end;
    15  /
    20      SMITH              800.00
    30      ALLEN             1600.00
    30      WARD              1250.00
    20      JONES             2975.00
    30      MARTIN            1250.00
    30      BLAKE             2850.00
    10      CLARK             2450.00
    20      SCOTT             3000.00
    10      KING              5000.00
    30      TURNER            1500.00
    20      ADAMS             1100.00
    30      JAMES              950.00
    20      FORD              3000.00
    10      MILLER            1300.00
    Total Salary:   29025
    Total Records:  14
    PL/SQL procedure successfully completed.
    SQL>SY.

  • How to scroll down text on UITextField ?

    Hi guys.
    I am trying make multiline text edit field using UITextField.
    When writing a long text, it doesn't scroll down (doesn't move to down next line).
    Just appearing one line.
    Can you help me how to make multiline text editing field ?
    Thanks in advance.

    Is there some reason you're not using UITextView instead of UITextField? UITextView is a subclass of UIScrollView, and supports multi-line text entry as well as vertical and horizontal scrolling. UITextField is not designed to do what you want.
    \- Ray

  • How to write text file in acrobat javascript

    Hi,
    I need to write a txt file from acrobat javascript. How can i do this?
    My requirement is to get identity mail id and name? Using acrobat javascript i can able to take mail id as identity.email. I get the mail id as alert and in console
    How can i write this mail id to text file?
    Thanks in advance...

    Hi,
    here is a commented program stanza
    var v = this.getField("myTextField").value;
    // Get the contents of the file attachment with the name "MyNotes.txt"
    var oFile = this.getDataObjectContents("MyNotes.txt");
    // Convert the returned stream to a string
    var cFile = util.stringFromStream(oFile, "utf-8");
    // Append new data at the end of the string
    cFile += "\r\n" + v;
    // Convert back to a stream
    oFile = util.streamFromString( cFile, "utf-8");
    // Overwrite the old attachment
    this.setDataObjectContents("MyNotes.txt", oFile);
    // Read the contents of the file attachment to a multiline text field
    var oFile = this.getDataObjectContents("MyNotes.txt");
    var cFile = util.stringFromStream(oFile, "utf-8");
    this.getField("myTextField").value = cFile;
    [signature deleted by host]

Maybe you are looking for

  • Remote Access VPN on Cisco ASA Problem

    Hi, i configured Remote access VPN on Cisco ASA 8.x as per below configuration. Problem is that my internet has stopped working, and default route is just showing stars. i can ping internal server 10.110.10.150 fine , which i allowed on VPN ACL, but

  • How to end text element in sap script

    how to end an text element in sap script this is the format. /E text element name &tablename-fieldname& text-text-text-text now if i do not end that text element it is not displayiny my below text , so what to do in this case

  • Labview : No USB communicat​ion with the DLN-2 adapter board.

    Hi, I am trying to use a Diolan DL2-N USB to I2C/SPI/GPIO adapter (https://diolan.com/dln2). This manufacturer provides Labview drivers for the board as well as example VIs. I just want to use them to access to all interfaces via Labview. After that

  • Problem building PetStore 1.1.2 with WebLogic 6.1

    I am trying to build the JPS-1.1.2 example using WLS 6.1 according to the instructions at: http://e-docs.bea.com/wls/docs61/petstore/bea_deployathon.html The build fails with the following message: [execon] Error: [jspc]: 2 file(s) failed: [execon] /

  • Cameras vs. views; views.xml

    Hi guys, [Question 1] I'm having problems defining and using appropriate user-defined cameras / views created within Acrobat 3D Toolkit. What I would like to do is predefine a set of appropriate user-defined views based on exact angles within my U3D