How to display a StyledDocument? (not in JTextComponent)

I have read the following tutorials and relevant API's from the Swing Connection:
Text overview: http://java.sun.com/products/jfc/tsc/articles/text/overview/index.html
Text attributes: http://java.sun.com/products/jfc/tsc/articles/text/attributes/index.html
The Element interface: http://java.sun.com/products/jfc/tsc/articles/text/element_interface/index.html
.. and still don't get how to display a simple DefaultStyledDocument!
The Text Overview tutorial has a brief discussion on Views, and the use of them.
Let's say the doc is my DefaultStyledDocument. If I do a doc.getDefaultRootElement(0) this will give me the secion, which contains the children of all the paragraphs.
I'd like to get all these paragraphs, put them into ParagraphViews and display them in my paint() method.
I understand that the children of these paragraphs contain the Attribute information.
The only way I'm able to dispay something is if I get the child of the first paragraph (eg. root>child>child) - which should be the style run (attribute information)) and then insert it into a LabelView.
If I were to add all the different text's (each element in a paragraph) and display them, then the only way I can think of is to create a LinkedList or something of LabelView's, keep track of positions etc. myself, and then do a paint() on each one of them in a for-loop. Surely, this isn't the way it should be done.
If I try to call paint() on eg. a BoxView (which I have given the doc.getDefaultRootElement()), or a ParagraphView (which I have given the first element - the paragraph) - nothing is displayed. I can't find anything in the API on how to add children to a paragraph, or display it's children (I found paintChild() but it is protected)..
Does anyone know of a tutorial describing how to display a DefaultStyledDocument through one of the javax.swing.text.view's, or have an explanation on how to do it? It would be greatly appreciated!! :)

You can extract hierarchy of views (tree) from TextUI
like this
import java.awt.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.plaf.*;
public class Test
JFrame frame;
public static void main(String args[])
new Test();
public Test()
frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JEditorPane edit=new JEditorPane();
edit.setEditorKit(new StyledEditorKit());
edit.setText("test");
TextUI ui=edit.getUI();
View v=ui.getRootView(edit);
Panel p=new Panel();
p.bv=v;
JScrollPane scroll=new JScrollPane(p);
frame.getContentPane().setLayout(new BorderLayout());
frame.getContentPane().add(scroll,BorderLayout.CENTER);
frame.setSize(300,200);
frame.setVisible(true);
class Panel extends JPanel {
public View bv;
public void paint(Graphics g) {
super.paint(g);
bv.paint(g,new Rectangle(0,0,100,100));
best regards
Stas

Similar Messages

  • How to display time duration (NOT dates) with an input mask in a JTable?

    Background: I am trying to display in a JTable, in two columns, the start position and time duration of an audio clip.
    They are stored as type float internally eg. startPosition = 72.7 seconds.
    However I wish to display on screen in the table in HH:mm:ss:S format. eg. 00:01:12:7. The user can edit the cell and input values to update the internal member fields.
    Problem: I am finding it very difficult to implement this - what with the interactions of MaskFormatter, DefaultCellEditor etc.
    Also using SimpleDateFormat and DateFormatter does not work as they insist on displaying the day, month, year also in the table cell.
    Taking the Swing Tutorial TableFTFEditDemo example as a template,
    (http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#TableFTFEditDemo)
    does anyone know how to do this?
    I can post my (buggy) modifications to the example code - if it would help.
    Appreciate any help.
    thanks,
    Anil

    Here are my modifications to the TableFTFEditDemo example. If you run it, you get an exception
    like java.lang.NumberFormatException: For input string: "18:00:03.500"
    The two modified classes are taken from the Tutorial and are listed below:
    =================
    * IntegerEditor is a 1.4 class used by TableFTFEditDemo.java.
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.DefaultCellEditor;
    import javax.swing.JFormattedTextField;
    import javax.swing.JOptionPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    import javax.swing.SwingUtilities;
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyEvent;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Toolkit;
    import java.text.DateFormat;
    import java.text.NumberFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import javax.swing.text.DateFormatter;
    import javax.swing.text.DefaultFormatterFactory;
    import javax.swing.text.MaskFormatter;
    import javax.swing.text.NumberFormatter;
    class TimeRenderer {
         float seconds;
         TimeRenderer(String str) {
              int hSec = Integer.parseInt(str.substring(0,2)) * 60 * 60;
              int mSec = Integer.parseInt(str.substring(2,4)) * 60;
              int sSec = Integer.parseInt(str.substring(4,6));
              float tSec = Integer.parseInt(str.substring(6,7))/10.0F;
              seconds = hSec + mSec + sSec + tSec;
    * Implements a cell editor that uses a formatted text field to edit Integer
    * values.
    public class IntegerEditor extends DefaultCellEditor {
         JFormattedTextField ftf;
         static Date zeroTime = new Date(0L);
         private boolean DEBUG = true;
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.S");
         MaskFormatter maskFo = new MaskFormatter("##:##:##.#");
         protected MaskFormatter createFormatter(String s) {
              MaskFormatter formatter = null;
              try {
                   formatter = new MaskFormatter(s);
              } catch (java.text.ParseException exc) {
                   System.err.println("formatter is bad: " + exc.getMessage());
                   System.exit(-1);
              return formatter;
         public IntegerEditor(int min, int max) throws ParseException {
              super(new JFormattedTextField(new MaskFormatter("##:##:##.#")));
              ftf = (JFormattedTextField) getComponent();
              // Set up the editor for the cells.
              ftf.setFormatterFactory(new DefaultFormatterFactory(new DateFormatter(sdf)));
              ftf.setFocusLostBehavior(JFormattedTextField.PERSIST);
              // React when the user presses Enter while the editor is
              // active. (Tab is handled as specified by
              // JFormattedTextField's focusLostBehavior property.)
              ftf.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "check");
              ftf.getActionMap().put("check", new AbstractAction() {
                   public void actionPerformed(ActionEvent e) {
                        if (!ftf.isEditValid()) { // The text is invalid.
                             ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                             ftf.setBackground(Color.PINK);
                             ftf.postActionEvent(); // inform the editor
                        } else
                             try { // The text is valid,
                                  ftf.commitEdit(); // so use it.
                                  ftf.postActionEvent(); // stop editing
                             } catch (java.text.ParseException exc) {
         // Override to invoke setValue on the formatted text field.
         public Component getTableCellEditorComponent(JTable table, Object value,
                   boolean isSelected, int row, int column) {
              JFormattedTextField ftf = (JFormattedTextField) super
                        .getTableCellEditorComponent(table, value, isSelected, row, column);
              System.out.println("value:" + value);
    //          long milliseconds =(long) (Float.parseFloat(value.toString()) * 1000);
              long milliseconds =(long) (((Float) value).floatValue() * 1000);
              Date dt = new Date(milliseconds);
              ftf.setValue(dt);
              return ftf;
         // Override to ensure that the value remains an Integer.
         public Object getCellEditorValue() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              Object o = ftf.getValue();
              try {               
                   Calendar cal = Calendar.getInstance();
                   cal.setTime((Date)o);
                   float seconds = cal.getTimeInMillis()/1000.0F;
                   return sdf.format(o);
                   //return new Float(seconds);
              } catch (Exception exc) {
                   System.err.println("getCellEditorValue: can't parse o: " + o);
                   exc.printStackTrace();
                   return null;
         // Override to check whether the edit is valid,
         // setting the value if it is and complaining if
         // it isn't. If it's OK for the editor to go
         // away, we need to invoke the superclass's version
         // of this method so that everything gets cleaned up.
         public boolean stopCellEditing() {
              JFormattedTextField ftf = (JFormattedTextField) getComponent();
              if (ftf.isEditValid()) {
                   try {
                        ftf.commitEdit();
                   } catch (java.text.ParseException exc) {
              } else { // text is invalid
                   ftf.setBorder(BorderFactory.createLineBorder(Color.RED));
                   ftf.setBackground(Color.PINK);
                   return false; // don't let the editor go away
              return super.stopCellEditing();
    //=====================================================
    * TableFTFEditDemo.java is a 1.4 application that requires one other file:
    *   IntegerEditor.java
    import javax.swing.JFrame;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.text.ParseException;
    * This is exactly like TableDemo, except that it uses a
    * custom cell editor to validate integer input.
    public class TableFTFEditDemo extends JPanel {
        private boolean DEBUG = false;
        public TableFTFEditDemo() throws ParseException {
            super(new GridLayout(1,0));
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Set up stricter input validation for the integer column.
         //   table.setDefaultEditor(Float.class,
           //                        new IntegerEditor(0, 100));
         //If we didn't want this editor to be used for other
         //Integer columns, we'd do this:
         table.getColumnModel().getColumn(3).setCellEditor(
              new IntegerEditor(0, 100));
            //Add the scroll pane to this panel.
            add(scrollPane);
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            private Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Float(5.7), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Float(3.5), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Float(2.9), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Float(20.8), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Float(10.5), new Boolean(false)}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                 Object obj = getValueAt(0, c);
                 System.out.println("getColumnClass.obj:" + obj);
                return obj.getClass();
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 2) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            private void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
         * @throws ParseException
        private static void createAndShowGUI() throws ParseException {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("TableFTFEditDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            TableFTFEditDemo newContentPane = new TableFTFEditDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    try {
                             createAndShowGUI();
                        } catch (ParseException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    }

  • How to: display large error note in the front panel?

    hi guys,
    When "error out" has an error, I would like to display HUGE RED TEXT in the FRONT PANEL saying: "STOP, ERROR DETECTED!"  )
    How to do that?
    Thanks for your help.
    Solved!
    Go to Solution.

    Place an indicator on the panel. Set the text to HUGE and RED, and set its value to "STOP, ERROR DETECTED!". Make it not visible. When you get an error, use the "Visible" property node to display it.
    To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

  • MDX Query - how to display member name not alias

    <p>Hello,</p><p> </p><p>I have a number of mdx queris that i am running through thecommand prompt. The query output is displaying the member aliasinstead of name does anyone know how i can change this.</p><p> </p><p>My query looks like this</p><p> </p><p>SELECT NON EMPTY<br>{[AUM_CBAL]} ON AXIS(0),<br>{[Product].levels(0).members} ON axis(1),<br>{[Calendar].ME20050630} ON axis(2),<br>FROM AUM.Aum</p><p> </p><p>Thanks!!</p><p> </p><p>Ranee</p><p> </p>

    Assuming that you mean essmsh: this is a setting you can change. the command to change is:<BR><BR>alter session set dml_output alias off ;<BR><BR>Not sure if you can change this in EAS<BR><BR>HTH

  • How To: Display Special Characters, Not Boxes?

    Okay, here's a question. I searched the FAQs, the support pages, and used the search forum option and came up with nothing, so here I am.
    I have CDs that are from other countries, namely Japan. The bands names and song titles are written in Kanji (the symbols rather than letters written out).
    When I import the songs to iTunes, the kanji characters show up as little squares instead of the actual characters.
    However, when I copy the song title or band name and then paste into a messenger window or Word or a browser search bar, it shows up just fine.
    To me, this says the information is still there, just not displaying correctly in iTunes. And since I can see it in other applications, my computer can obviously read the character set.
    As it stands right now, and in past releases of iTunes, I have to decide which "four square" song is the song I wish to listen to. (When there are 20 "four square" songs by the same "two square" artist, all roughly 3 minutes in length, it gets a bit difficult to figure out which song is the one you're wanting.)
    Side note - On my iPod, it doesn't show up as boxes, but rather as funky symbols that are not in any way kanji. Like an A with a degrees sign over the top of it and various $%*# symbols instead of the Kanji.
    So, the question is, is there a solution to this or at least somewhere I can enter the question as an "I need support" question?
    I found places to report everything under the sun except for iTunes or the iTunes store. Very... disturbing...
    Thank you for your time and I hope someone at least has a suggestion!
    ~Dark Avenger
    Dell Inspiron 5100 - Windows XP

    Have a look at Tom Gewecke's User Tip and see if it contains a solution to your problem.

  • How to display Internal Dairy Notes and External Dairy Notes on output

    hi Friends,
    any one knows how to fetch External dairynotes as well as internal dairy notes thru FB03 T code
    regards,
    Anil kumar p

    hi Rob,
    we need to retrieve internal n external dairy notes thru Read_Text FM.
    we need to pass following param.
    client -> sy-mandt...
    id ->d000(for external dairy notes) and d001 to d015 (internal dairy notes)
    lang -> sy-langu
    name -> note1 (Is comb. of bsid-bukrsbsid-belnrbsid-gjahr+bsid-buzei)
    object->doc_item
    tables
      lines -> tbline.
    and tbline is the return values for dairy notes.

  • How to display text of note tab of invoicing

    Hi all,
    I want to display text that is written in notes tab while doing invoicing that is through FB60 and MIRO.
    I searched for it in tables STXL and STXH but text isnt stored there, pls help me out.
    Thank you,
    Sonali

    Thanks Gokul it helped
    awarded u points.

  • I have restored my new replacement iPhone 5s from my latest iCloud back up. However my camera roll pictures are not displaying. Its not saying i don't have any pictures, it just shows empty white squares? How do I get my pictures back? Thanks!

    I have restored my new replacement iPhone from my latest iCloud back up. However my camera roll pictures are not displaying. Its not saying I don't have any pictures in my camera roll, it has all the spaces for them, but it just shows empty white squares? How do I get my pictures back? Thanks!

    It's difficult to say whether it's stuck or not as the time to restore a backup can depend on many factors.  You'll have to decide when you think it's just not continuing.  You could try turning the phone off (hold the power button until you see the red off slider, then slide to turn off), then back on to see if that would get it going again.
    When you're convinced it's just hung, you can go back to settings and tap Stop Restoring iPhone to stop the restore.  You'll then have to try restoring it again (Settings>General>Reset, tap Erase All Content and Settings, go through the setup screens and when given the option, choose Restore from iCloud Backup).  Be sure it's connected to your charger and wifi while it's restoring the backup.
    You might also try the approach posted here by ezjules: https://discussions.apple.com/message/19518589#19518589.  This seems to have worked for some people who had trouble restoring their photos from an iCloud backup.

  • How to display on the graph three or more waveforms where time scale is not an index of array but a real time

    How to display on the graph three or more waveforms where time scale is not an index of array but a real time:
    I measure three voltages Va, Vb, and Vc on my Test stands every 3sec. So I’m building four arrays (Va, Vb, Vc, Time) and combine all in one.
    Time
    Va
    Vb
    Vc
    0
    5
    3.5
    2.8
    3
    4.9
    3.6
    2.9
    6
    4.8
    3.8
    2.1
    Now I need to show on the graph in which scale X is “Voltage” and scale Y is “Time”.
    How can I do it?
    Thanks a lot,
    Boris

    Hi, thanks all your reply.
    You may find "points_to_bar_graph.vi" from this website, I find it by this way.
    I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
    So here I just paste it into word document.
    Attachments:
    question.doc ‏520 KB
    points_to_bar_graph.vi ‏62 KB

  • How to display the notes?

    In the arrange window, my midi tracks are displayed as midi notes(like in the piano roll). How to let it display as music notes like the ones in the score?
    THank you!

    music production wrote:
    http://www.midifan.com/plugin/host/Logic-Pro-7-lg.jpg
    watch the piano track. Logic 7 already can do this, and I believe logic 8 can do the same!
    It can't, the note display has been exchanged for the mini-piano roll display.
    The new display was the direct result of user requests. Maybe they can put a toggle in one of the upgrades.
    pancenter-

  • Adobe Connect: how to display a picture in the WebCam pod when not sharing video

    Adobe Connect: how to display a picture in the WebCam pod when not sharing video

    The WebCam pod can pause a live video showing a static image. However, I believe that you are looking to use a Share pod, where you can upload a JPG or PNG image. Just place the share pod with the image where you would have the Camera pod.

  • How to Display "Advanced Startup Options" Menu during Boot (NOT Restart)

    How do I get to the "Advanced Boot Options" menu when booting WSE2012? I currently cannot boot from the system drive, the installation DVD or a bootable USB installation drive since the September 19 Microsoft updates were installed. I cannot
    do a "restart" to get there since I cannot get into WSE2012 at all in the first place. No matter how I boot the system, I can never get past the "logo/progress circle" screen. I want to restore a system backup from before September
    19 but cannot figure out how to do it since I cannot get to the "Advanced Boot Options" screen. I searched through my ASUS UEFI BIOS for an option to restart with the advanced menu displayed but could NOT find any setting for this. I am totally lost.
    How can I do a system restore (i.e., recovery)? Please HELP!
    Denis W. Repke

    I've pretty sure I read that Microsoft removed the "F8" feature in Windows 8 and Windows Server 2012. In any case, I did try "F8" a couple of times on WSE2012, pressing and releasing it numerous times during the boot process, starting well before Windows
    started to load -- and it did NOT do anything.
    I also was amazed that the system would not boot from the WSE2012 installation disk from either of my DVD drives nor from a bootable USB drive containing the install files. Until this incident, I never had a problem booting from a "bootable" DVD or
    USB drive on that server. It is also very easy to bring up the "Boot Menu" from my ASUS UEFI BIOS during the boot from which I can select precisely what boot device I want to use.
    As I explained in detail in my earlier post on this forum, the only way I was able to get to the "Advanced Startup Options" screen was by swapping SATA ports for my system disk which "somehow" caused the next boot to automatically start "Auto-Recovery" mode
    which finally allowed me to get to the "Advanced Startup Options" screen and recover the system files from an earlier date. After doing this, the system rebooted without issues. After booting, I ran a set of backups after using Windows Update. Then, I powered
    down,"unswapped" the SATA ports and rebooted. No problems.
    This was all very weird and frustrating. I still cannot believe that there is apparently no way to "directly" get to the "Advanced Startup Options" screen during a hard boot. If there was, recovery would have been simple instead of several days of frustration
    with a "dead" home server.
    Denis W. Repke

  • NOT WORKING -How To Display All Comments for a Planning Package

    Hi All,
    I am using How to Document "How To Display All Comments for a Planning Package" to display comments for list of "cost center" against different "fiscal/year" for Key Figure "Budget Amount".
    Below is how the Layout looks like where comments are posted against Cost Center- year combination.
    Cost Center                          2007     2008     2009     2010     2011
    3          2.00     2.00     2.00     2.00     2.00
    4          2.00     2.00     2.00     2.00     2.00
    6          2.00     2.00     2.00     2.00     2.00
    7          2.00     2.00     2.00     2.00     2.00
    This case is very similar to the example given in how to document but after following all the steps correctly in the document and also followings various forum links such as below , I am not able to display the comments for list of Cost Centers.
    "How to...BSP display comments"...problem with row comment
    Below are the issues being faced:
    1) When i save the comments , the icon for comments (indicating that some comments have been entered) is not shown against selection of Cost Center-Year although the comment is saved.Comment are  also visible in BPS0.
    2) On execution "Web interface could not be loaded" - is the message that is shown in the area where BPS application should show all the comments.
    Highly Appreciate any help with issues mentioned above.
    Kind Regards,
    Robin Johri

    Hello Robin,
    1) please check if you set the row/cell selection property correctly for the layout component in the web interface.
    2) the error does not make sense since the comments are displayed in an iframe using a BSP application, not a web interface. Check the URL in the HTML text component.
    Regards,
    Marc
    SAP Techology RIG

  • How to display raw, not ascii, bytes from serial port?

    Hello, I have an instrument that outputs raw data, not ascii, bytes to a serial port.  How do you display raw data, not ascii, bytes from a serial port?  Since raw data bytes are not displayable, there is got to be something in labview to interpret/display the received bytes the way it is as data in HEX or Binary.  The STRING-TO-HEX and STRING-TO-BINARY functions are not applicable in this case because the bytes were not string type in the first place.  For example, if the receive byte is 0x4D, I need to display 4D in HEX or 77 in Decimal and not the ascii character "M" corresponding to 0x4D ascii code.  I am using a VISA-RD function currently to receive the data from a COM port.  VISA-RD outputs string type.  Thank for any feedback or suggestion in advance.

    BC@Baxter wrote:
    ...The STRING-TO-HEX and STRING-TO-BINARY functions are not applicable in this case because the bytes were not string type in the first place...
    Of course they are string type, just not formatted in a human readable form. So, YES, these functions are not appropriate.
    BC@Baxter wrote:
    For example, if the receive byte is 0x4D, I need to display 4D in HEX or 77 in Decimal and not the ascii character "M" corresponding to 0x4D ascii code. 
    Dennis is right, but there is no "decimal" display for strings, so the second requirement needs a tiny little bit more code.
    If you have a single byte string, you can typecast it into a U8 number and set the display format as decimal, hex, octal, or binary as desired. In decimal, it would display the number 77. Since it is now a numeric, you can even do math with it.
    In general, the string has multiple bytes, and you would typecast it into an array of U8 numbers (Since this is an often used function, there is also a "string to byte array" which does the same thing).
    Typecasting is the secret. You can e.g. easily typecast 2 bytes into a U16, 4 bytes into a I32, 8 bytes into a DBL,  etc. For more detailed requirements, there is also the "unflatten from string". Check the online help for details. Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • Am from India. when i tried to turn on face time the error displayed is" Could not  sign in. Check your network connection and try again". how can it be resolved?

    Am from India. when i tried to turn on face time the error displayed is" Could not  sign in. Check your network connection and try again". how can it be resolved?

    If you are using someone else's WiFi they may have restrictions in place.
      (cofee shop, etc..)
    Have you tried connecting using at least more than one particular WiFi network ?
    You might want to try googling for a bandwidth test site
      verify you have reasonable throughput..
        1 megabit up and 1 megabit down..
          (bandwidthplace.com is what I typically use..)

Maybe you are looking for