How To Display Time Information in Report/Results?

Is it necessary to manually calculate the following?
Execution start time
Elapsed duration since Execution start
Step start time
Step completion time
If not, where are these results available within TestStand?
I would like to store the sequence absolute timestamp (from Windows), execution elapsed time, and step duration at the completion of a step.  What is the proper callback to use for this?
I found the Engine.SecondsSinceStart  property, but this does not correlate with the start of an execution.  This only correlates to when the TestStand Engine was launched, not when the Sequence was started.
Any advice would be appreciated.
CLA, CTA
Solved!
Go to Solution.

Thanks for the digging, it appears I need a better shovel.  I did a summary of relative timing information from our discussion:
Relative Time
Engine Seconds Running
RunState.Engine.SecondsSinceStart
Execution start time
 Execution.SecondsAtStart
Elapsed duration since Execution start
RunState.Execution .SecondsExecuting
Step "n" start time
Locals.ResultList[n].TS.StartTime
Step "n" step duration
Locals.ResultList[n].TS.TotalTime
Step completion time
Locals.ResultList[n].TS.StartTime + Locals.ResultList[n].TS.TotalTime
Absolute Time Conversion
Use this offset to convert the relative time to absolute timestamps
RunState.Engine.SecondsSince1970UniversalCoordinatedTime
CLA, CTA

Similar Messages

  • How to display field information dynamically in reports

    How to display field information, depending on the description in DOMAINS..dynamically in reports...
    give an example.
    Thanks

    Hi
    the text u should take into the internal table for that and
    it should send into the ALV_GRID_DISPLY
    SLIS_FIELDCATALOG_T_ALV-SELECTION_TEXT = " DOMAIN".
    other wise u should set in the write statement
    write : / '     '.

  • Doubt , how to display ole objects in report builder

    Please tell me, how to display ole objects in report builder.
    I mean i wanted to print ole object in report, so how to do that.

    Just to clarify Lixia's response.
    In Reports 9i we have deprecated our OLE functionality. Reports created in prior versions that contain OLE objects should still run, but you will not be able to create new reports containing OLE objects.

  • How to display time difference in a single cell separately.

    Hi All,
    I have an issue where you have to calculate the Start time and End Time , Start Date and End Date for a particular Work item number
    For eg ;
    WI_ID            WI_CD                WI_CT
    000001312610        02/09/2009      09:48:4     02/09/2009      09:48:9 
    000001312610        02/09/2009      09:54:4   02/09/2009        09:54:9
    000001312610        02/09/2009      09:54:5     02/09/2009      09:54:9
    000001312610        02/09/2009      10:07:0  02/09/2009         10:07:9
    000001312610        02/09/2009      10:07:0     02/09/2009      10:07:9
    000001312610        02/09/2009       10:16:5     02/09/2009       10:16:9
    000001312610        02/09/2009     10:16:7       02/09/2009     10:16:9
    Similarly I get the Endtime and ENd dayfrom other table for same work item.so my output should have the result as ,So my requirement here is
    in the it should show the display in a single cell .as, 5secs, 5 secs,4 secs,9secs,4 secs,2 secs
    for each work item.
    Can any body help me on this issue.
    Any pionters for this are much helpful forme.
    Thanks
    Rohini

    Hi Kewin,
    Its not the question of concatenation, that can be handled later.
    But my issue is how to calculate time difference for each single step

  • How to display tooltip information on a website

    How can I view information when I hover or hold my finger/stylus on a button/icon?
    I use a website which has icons which display text information about items when you hover your mouse cursor over it.
    On my previous device I could hold my finger/stylus on the icon and have the information bubble popup to read.
    How can I view the text popup bubble in my Firefox on Android?
    I have a Sony Xperia Z Ultra with Android 4.4.4 (Kitkat) and using Firefox version 33.1 for Android.
    Let me know if You need any other info?
    Thank you.

    I forgot to mention. Long pressing on the icon only result in the text being selected/highlighted. The popup/tooltip message does not display.
    I added two screenshots. The one displays the popup message correctly when hovering the mouse cursor over the '?' icon, as it is on my computer. The other screenshot displays the text being seleted when I press long on the '?' icon.

  • How to display page numbers in report

    hi all,
    i would like to know how to display page numbers in this format " 1 of 5" in the report.
    Any help would be much appreciated.
    thanks
    seema

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • How to display the drill through report in a new browser seperate window

    Hello All,
    I am working on a drill through report which should run when I select the column value from the main report. The drill through report I am working on is Centerline Validate Angles for a specific line. It has 2 parameters, Pods ID and Angle. Main report supplies
    these 2 values. Right now, I am having an issue in displaying the drill through report in a seperate window. I have selected Go To URL option from the text box properties in main report and gave the expression as
    ="javascript:void(window.open('http://vmaidbdev1/Reportserver?%2fADN2%2fPipeline%2fCenterline+Validate+Angles+For+Specifi+Line&rs%3aCommand=Render&PODS_ID="&Fields!LINE_ID.Value &"&Angle="&Parameters!Angle.Value
    This is not working. The field in the main report is clickable but when I click it is throwing me error as Reporting services error. Could any one let me know if there is any error in the above expression or anything I need to add or correct.
    Please help. Thanks so much.

    Hi srisql,
    Sorry for the delay in getting back to you.
    After double-check the URL which I posted, I find that I have made some error in it. As you can see, there are some spaces in the URL. So please try the following expressions to check the issue again.
    Angle parameter is a multi-value parameter:
    ="javascript:void(window.open('http://vmaidbdev1/reportserver?/Adn2/Pipeline/Centerline Validate Angles for a specific line&PODS_ID="& Fields!LINE_ID.Value &"&Angle="
    &Join(Parameters!Angle.Value,"& Angle =") &"','_blank'))"
    Angle parameter is a single-value parameter:
    ="javascript:void(window.open('http://vmaidbdev1/reportserver?/Adn2/Pipeline/Centerline Validate Angles for a specific line&PODS_ID="&Fields!LINE_ID.Value &"&Angle="&Parameters!Angle.Value
    &"','_blank'))"
    The following general URL is for your reference:
    ="javascript:void(window.open('http://server_name/reportserver?/folder/ folder/report_name&parameter_name="&Fields!field_name.Value &"&parameter_name="&Parameters!parameter_name.Value
    &"','_blank'))"
    If you have any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to display time with min ,sec in select lis lov - 0-23 hrs and 0-59 min

    Hi,
    How to use time between 0-23 hrs,0-59 min in select list and insert selected value into single column.Like if i select 20:00 hrs,34 min ,value should be insert into single database column.
    Please help me to get the answer of this question.
    Kind Regards,
    Harish Sharma

    One select list would have 24 x 60 entriies. You should use two. One for hours and the other one for minutes. The SQL could be:
    SELECT     LEVEL d, LEVEL r
          FROM DUAL
    CONNECT BY LEVEL < 25;
    SELECT     LEVEL d, LEVEL r
          FROM DUAL
    CONNECT BY LEVEL < 61;The source is static. The actual column (for example :P1_TIME_COLUMN) with source database column is hidden. You would have a computation (PL/SQL Function) on submit which would then bring the two selected values together:
    DECLARE
       v_time   VARCHAR2 (40);
    BEGIN
       v_time := :p1_select_list1 || ':' || :p1_select_list2;
       RETURN v_time;
    END;Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to display space colums in report

    Hi All,
    I created one report, it have 21 columns.My table have 10 million records. I need only 5 Lacks records. My requirement is I need to add 4 space columns in that report.I am using Obi 10g.
    Step1: In Answers, I implement case statement like CASE WHEN 1=2 THEN TIMES.YEAR or ‘ ‘ END.
    Step 2: In RPD, I created new logical columns applied above case statement.
    Step 3: In ETL, One new space column created, I import into the RPD and Pull into the report.
    When I pull 4 columns into the report, it will not display the date and take more time but I remove those columns it will give data very soon.
    Advance Thanks,
    Thanks,
    Raja

    Hi Raja,
    Have you tried just typing ' ' as the column formula in answers. I suspect using the case statement is resulting in the expression being pushed back to the database in an inefficient way.
    Also shouldn't the statement be
    CASE WHEN ... THEN ... ELSE ' ' END
    Regards,
    James
    Edited by: James - Projected on May 28, 2012 2:34 PM

  • How to display customize values in report?

    I need to be able to show certain customize values in a report portlet. Preferably just above the table of results. How do I do that?
    Grateful for any help...
    Bryan

    Hi Bryan,
    If customized values means the parameters of the dynamic report you can do the following:
    <ORACLE>
    Declare
    v_deptno number :=(:deptno); /* :empno is the bind variable*/
    Begin
    htp.p('<table border=1>');
    htp.p('<tr>');
    htp.p('<td>');
    htp.p('<FONT face="Times New Roman" color=#000080 size=+1>');
    htp.p(v_deptno);
    htp.p('</FONT>');
    htp.p('</td>');
    htp.p('</tr>');
    htp.p('</table>');
    htp.p('<BR>');
    htp.p('<table BORDER=1 WIDTH=100%>');
    htp.p('<tr>');
    htp.p('<td nowrap bgcolor=#6666CC align=left><FONT face="Times New Roman" color=white><B><U>Last Name</U></B></FONT></td>');
    htp.p('<td nowrap bgcolor=#6666CC align=left><FONT face="Times New Roman" color=white><B><U>First Name</U></B></FONT></td>');
    FOR c IN (SELECT lastname, firstname from emp where deptno = v_deptno) LOOP
    htp.p('</tr>');
    htp.p('<td nowrap align=left>');
    htp.p('<FONT face="Times New Roman" color=#000080 size=-1>');
    htp.p(c.lastname);
    htp.p('</FONT>');
    htp.p('</td>');
    htp.p('<td nowrap align=left>');
    htp.p('<FONT face="Times New Roman" color=#000080 size=-1>');
    htp.p(c.firstname);
    htp.p('</FONT>');
    htp.p('</td>');
    htp.p('</tr>');
    END LOOP;
    htp.p('</table>');
    END;
    </oracle>

  • How to display Cell Text in Report?

    Hello,
    The users want to add cell text (comments) to their data for the controllers. The users are asked to enter their comments on a certain intersection of cells (e.ge. Total Year -> Plan -> Product unspecified). We want to display a report with the data and next to it the comments given.
    One option is to print the webforms, but the result is terrible.
    What options are there to accomplish this?
    Thanks in advance,
    Philip Hulsebosch

    Hi,
    Have you had a look at using BI Publisher Desktop to customise web forms as reports for printing.
    For further information have a look the 9.3.1 planning admin documentation, page 213 "Customizing Reports", it is pretty easy to get a grip on and might just help formatting issues.
    Otherwise Financial Reports may be another angle to start investigating.
    Hope this helps
    John

  • How to display multiple column in report

    Hi Abaper,
    I have client requirment to develop new report for sim hotel.
    The requirment is we have select multiple hotel , based on hotel selection the report will display, the report layout like:
    Hotel1               |Hotel2               |Hotel 3          
    Day     |Month     |Year     |Day     |Month     |Year     |Day     |Month     |Year
    Please any one can give me idea  how to develop same layout for this requirment.
    Thanks in Advance.
    Regards,
    Sourav

    Hi,
    U can use write statement like below
    write:/ 'Day 1'.
    write:20 'Year 1'.
    This will leave 20 spaces between Day 1 and Year 1.
    For more information u can go to transaction 'ABAPDOCU' and in Keyword help type 'Write' u will get all options u can use with write statement.
    Let me know further.
    Cheers,
    Parth Parikh

  • How to Display Time-Dependent Characteristic Data In Query

    Hi Experts,
       I have encountered a problem. I want to use Time-Dependent Chart. And want to display different value according characteristc's valid from time. For Example,
    The Characteristic 0COSTCENTER has the navigation attribute 0COMPANY, The data as:
    0COSTCENTER   Valid from   Valid To       0COMPANY
    BW2305              20070101   20070430     A
    BW2305              20070501   99991231     B
    I want  the report  can display as :
    0COSTCENTER   Valid from   Valid To       0COMPANY  AMOUNT
    BW2305              20070101   20070430     A                  1000
    BW2305              20070501   99991231     B                  2000
    But when I set the query's key date 20070420, the report display as:
    0COSTCENTER   Valid from   Valid To       0COMPANY  AMOUNT
    BW2305              20070101   20070430     A                  1000
    BW2305              20070501   99991231     A                  2000
    when I set the query's key date 20070520, the report display as:
    0COSTCENTER   Valid from   Valid To       0COMPANY  AMOUNT
    BW2305              20070101   20070430     B                 1000
    BW2305              20070501   99991231     B                  2000
    Can anybody tell me how I can get report expected.
    Thanks in advance.
    SF

    Hi,
    1) Add the characterstics 0COSTCENTER ,0DATETO,DATEFROM and  0COMPANY to the cube.
    2) And also add these 4 IOs to the Communication structures which has update rules with the concern cube.
    3) I hope , you already have  0COSTCENTER in the Commnication structure and mapping for that infoobject at both Update rules and Transfer rules.
    4) Leave to the Blank(no mapping) mappings for the IOs 0DATETO,DATEFROM and  0COMPANY in the Transfer rules.But make 1:1 mapping in the Update rules for these 2 infoobjects.
    5) Write the below code in the strt routine of the Update rules:
    TYPES:  BEGIN OF type4.
          include structure like /BI0/QCOSTCENTER.
    TYPES END OF type4.
    DATA:
      ITAB4 TYPE STANDARD TABLE OF TYPE4
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    SELECT * FROM /BI0/QCOSTCENTER INTO CORRESPONDING FIELDS
    OF TABLE ITAB4
    WHERE OBJVERS = 'A'.
    loop at DATA_PACKAGE.
         READ TABLE ITAB4 WITH KEY COSTCENTER = DATA_PACKAGE-MATERIAL 
    DATETO LE DATA_PACKAGE-PSTNG_DATE
    DATEFROM GE DATA_PACKAGE-PSTNG_DATE.
                  IF SY-SUBRC EQ 0.
                    DATA_PACKAGE-DATETO = ITAB4-DATETO.
                    DATA_PACKAGE-DATEFROM = ITAB4-DATEFROM.
                    DATA_PACKAGE-COMP_CODE = ITAB4-COMP_CODE.
                  ENDIF.
                  Modify DATA_PACKAGE.
      endloop.
      ABORT = 0.
    Here I assumed you have Posting date in the Communication structure and used to map to Fiscalperiod of the cube.
    6) Do the Master data upload to Cost center and active the master data of it always before uploading the data to cube.
    7) Do the uploading to cube from Sratch.
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by:
            Anil Kumar Sharma

  • 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 trace information like C++?

    Well, somebody may have asked this before, but I don't find it in this forum.
    I'd like to know how to implement a trace mechanism in Java like conditional compilation in C++ that the debug version of the program displays full trace information while the release version doesn't even include the tracing code. It is easily achieved in C++ by using #ifdef and #define. One book I once read suggests to use different packages. But this still leaves code that does nothing and takes up space and time in the release version.
    Thanks in advance.

    I am not quite sure about your question, but I try my best just for discussion.
    In my case, I will create a class with many different methods which will print the value of parameter to file(output stream).
    If I would like to trace the program, I will call the class method to output the values of variables and any additional information to file. After that, if there is any error, I will open the ouput file, and look for the generated information.
    Is it what you want?
    (the class only import java.io.*; and java.lang.* by default)

Maybe you are looking for