Hi how to add graph in swings

hi can anyone help me plz
how to add graph in swings
its very urgent
can anyone help me

As it is urgent, I might be late. Anyway, this is the tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/14painting/index.html

Similar Messages

  • How to add graphs on 10g?

    I ve seen very good graphs capability on 11g. Is it possible to use those graphics on Jdeveloper 10g or something like it?
    Which would be the reccomendes tool for making reports on 10g?
    Edited by: gmarquezp on 09-oct-2008 12:08

    Hi,
    We really recommend that you use JDeveloper 11g for Graphs.
    In 10.1.3 there was some limited graphing functionality available. For details on how to use graphs in 10.1.3, please consult this blog by Steve Muench.
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#88
    Hope this helps
    Katia

  • How to add (multiple) cursors programmatically in an XY graph?

     how to add (multiple) cursors programmatically in an XY graph?
    I am building an XY graph. then I would like to add cursors at certain locations (positioned on x axis) I determine through a program.
    How can I add cursors programatically?
    Thank you.

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • How to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area

    how to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area
    ananya

    Hey Ananya,
    I believe what you want to do is possible, but it will not be
    easy.  If you want to add a scroll bar that will scroll the graph
    back and forth but keep the axis set, you would want to add a
    horizontal or vertical scrollbar.  Then you would create an event
    handler for the scroll event.  You would have to manually plot
    different data within this scroll event.  Unfortunately, there is
    not really a built in way to do this with the Measurement Studio plot
    control.
    Thanks,
    Pat P.
    Software Engineer
    National Instruments

  • How to Add the title name for Graph in Excel

    Dear Friends
                      I am using LabVIEW 8.0.I need how to add the title name for chart in Excel.
    Jayavel
    Solved!
    Go to Solution.

    Do you have the Report Generation Toolkit? If so, the Excel Easy Graph VI has an input for that.
    If you don't have the toolkit then you will need to use ActiveX. Please do a search on how to use ActiveX (there are examples that ship with LabVIEW) to control Excel. There are also lots of example in the Excel thread. NOTE: DO NOT POST QUESTIONS IN THAT THREAD. 
    Ultimately you will need to look up the information in MSDN. 

  • How to add tick marks to all sides of graph

    Hi,
    I'm trying to format a graph in numbers and would like to know how to add tick marks to all axies on the graph, ie. top, bottom, left & right.
    I can get tick marks on the bottom and left axis, but can't seem to find a way to add them to the others.\
    Thanks,
    Oscar

    Hi Oscar,
    Numbers 2.3, but this will work in Numbers 3.0.1 with different Inspector choices.
    When in doubt, cheat! This will give a second Y axis. It is a 2-Axis Chart (the bottom one in this screen shot of Chart Types):
    Column C (Value 2) has dummy values copied from Column B (Value 1).
    Now hide the Column graph by selecting it and changing the fill to None. (Inspector > Graphic > Fill > None).
    Set gridlines, tick marks, hide Legend as you wish.
    To add a second X axis at the top, Chart Inspector won't do that. Insert Shapes and Text Boxes?
    Regards,
    Ian.

  • How to make graph?

    can anyone tell me how to show graph in the application and not using the java applets?thanks!

    Now with pie-chart too, Mmm-mmm pies!import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DynamicGraph extends JFrame implements ActionListener {
      JButton button;
      int []bar = new int[5];
      float []flote = new float[5];
      String str = "", title="";
      String []barLabels = {"","","","",""};
      String []percent = {"","","","",""};
      JLabel []JLab = new JLabel[5];
      JTextField titletxt;
      JTextField []Text = new JTextField[5];
      JTextField []labeltxt = new JTextField[5];
      boolean pieChart;
    public DynamicGraph() {
          super("Dynamic Graph");
          Container c    = getContentPane();
           JPanel panel = new JPanel(){
                 public void paintComponent(Graphics g)     {
                Graphics2D g2 = (Graphics2D)g;
                g2.setColor(new Color(223,222,224));
                g2.fillRect(0,0,500,400);
                g2.setColor(Color.orange);
                   if(pieChart) {
                      g2.fillArc(30, 130, 220, 220, 90, -bar[0]);
                      g2.fillRect(270, 170, 30, 20);
                   else g2.fillRect(30, 150, bar[0], 30);
                g2.setColor(Color.green);
                   if(pieChart) {
                      g2.fillArc(30, 130, 220, 220, 90-bar[0], -bar[1]);
                      g2.fillRect(270, 210, 30, 20);
                   else g2.fillRect(30, 190, bar[1], 30);
                g2.setColor(Color.red);
                   if(pieChart) {
                      g2.fillArc(30, 130, 220, 220, 90-(bar[0]+bar[1]), -bar[2]);
                      g2.fillRect(270, 250, 30, 20);
                   else g2.fillRect(30, 230, bar[2], 30);
                g2.setColor(Color.blue);
                   if(pieChart) {
                      g2.fillArc(30, 130, 220, 220, 90-(bar[0]+bar[1]+bar[2]), -bar[3]);
                      g2.fillRect(270, 290, 30, 20);
                   else g2.fillRect(30, 270, bar[3], 30);
                g2.setColor(Color.yellow);
                   if(pieChart) {
                      g2.fillArc(30, 130, 220, 220, 90-(bar[0]+bar[1]+bar[2]+bar[3]), -bar[4]);
                      g2.fillRect(270, 330, 30, 20);
                   else g2.fillRect(30, 310, bar[4], 30);
                g2.setColor(Color.black);              
                g2.setFont(new Font("Arial", Font.BOLD, 18));
                   if(pieChart) g2.drawString(title, 220, 142);
                   else g2.drawString(title, 50, 132);
                g2.setFont(new Font("Arial", Font.PLAIN,16));
                int temp=0;
                   if(pieChart) temp = 185;
                   else temp = 172;
                      for(int j=0; j <5; j++) {
                        if(pieChart) g2.drawString(barLabels[j]+percent[j], 305, temp);
                        else g2.drawString(barLabels[j]+percent[j], bar[j]+40, temp);
                        temp += 40;
                   if(!pieChart){
                      g2.drawLine(30, 130, 30, 350);
                      g2.drawLine(30, 345, 430, 345);
                      g2.drawLine(210, 345, 210, 350);
                      g2.drawLine(390, 345, 390, 350);
                      g2.setFont(new Font("Arial", Font.PLAIN,12));
                      g2.drawString("0%", 26, 362);
                      g2.drawString("25%", 113, 362);
                      g2.drawString("50%", 200, 362);
                      g2.drawString("75%", 287, 362);
                      g2.drawString("100%", 380, 362);
                   super.paintComponent(g2);
             panel.setOpaque(false);
          panel.setLayout(new FlowLayout() );
          button = new JButton("Draw 1");
          JLabel jLab = new JLabel("<html><font face='Arial'>Enter graph title here, then labels and<br>number values and press the button</font></html>");
          titletxt  = new JTextField(18);
          panel.add(jLab);
          panel.add(titletxt);
          JLabel addNums = new JLabel("Labels: ");
          panel.add(addNums);
             for (int j=0; j<5; j++){
                 str = Integer.toString(j+1);            
                 JLab[j] = new JLabel(str);
                 labeltxt[j] = new JTextField(6);
                 panel.add(JLab[j]);
                 panel.add(labeltxt[j]);
          button.addActionListener(this);
          JLabel labellers = new JLabel("Numbers");
          panel.add(labellers);
             for (int k=0; k<5; k++){
                 str = Integer.toString(k+1);            
                 JLab[k] = new JLabel("    "+str+" ");
                 Text[k] = new JTextField(3);
                 panel.add(JLab[k]);
                 panel.add(Text[k]);
          panel.add(button);
          c.add(panel);
    public void actionPerformed(ActionEvent e) {
       String command = e.getActionCommand();
         if(command.equals("Draw 1")){
           button.setText("Draw 2");
           pieChart=false;
           try {
           title = titletxt.getText();
             if(title.length() <1)title ="No title submitted";
             int temp =0;
             java.text.DecimalFormat df = new java.text.DecimalFormat("#0.#");
               for (int j=0; j<5; j++){
                  flote[j] = Float.parseFloat(Text[j].getText());
                  temp += (int)((flote[j]) +0.5);
               for (int k=0; k<5; k++){
                  bar[k] = (int)(((flote[k]/temp) * 360)+0.5);
                  barLabels[k] = labeltxt[k].getText();
                  flote[k] = (flote[k]/temp) *100;
                  percent[k] = ":  "+df.format(flote[k])+"%";
            catch(Exception message){
               title = "Oops! Complete all fields, enter numbers only";
         if(command.equals("Draw 2")){
           button.setText("Draw 1");
           pieChart=true;
       repaint();
      public static void main(String[] args) {
        DynamicGraph frame = new DynamicGraph();
        frame.setSize(500,400);
        frame.setLocation(200, 200);
        frame.setResizable(false);
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setVisible(true);
    }

  • How to add image and videos in jframeusing netbeans..

    hi. im using netbeans where you can create a jframe form by just dragging and dropping items... can someone help me how to add an image? what item should i drag onto my jframe? help me pleasee...

    demo:
    import java.net.*;
    import javax.swing.*;
    public class ImageExample implements Runnable {
         public void run() {
              URL url = null;
              try {
                   url = new URL("http://blogs.sun.com/roller/resources/jag/SouthParkJAG-small.png");
              } catch (MalformedURLException e) {
                   throw new RuntimeException(e);
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(new JLabel(new ImageIcon(url)));
              f.pack();
              f.setLocationRelativeTo(null);
                    f.setVisible(true);
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new ImageExample());
    }

  • How to add an image to the JPanel

    i have been searching for many to add in an iamge to the JPanel...but with error..can anyone kndly help?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class adv extends JPanel {
    ImageIcon pic = new ImageIcon("home.gif");
    public void paintComponent(Graphics g) {
    g.drawImage(pic,0,0,this);
    super.paintComponent(g);
    public static void main(String[] args) {
    adv mpg= new adv();
    mpg.setLayout(new GridLayout(5,1,15,15));
         JFrame window = new JFrame ("dv");
    window.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);     
    window.add(mpg);
    window.setVisible(true);
    window.setSize (550,225);
    }

    i have try out the suggestion that u have provided...still with error...wat can i do to solve it? any other way?
    below is how i add to my program...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class adv extends JPanel {
        ImageIcon pic = createImageIcon("home.gif");
        public void paintComponent(Graphics g) {
      super.paintComponent(g);
    g.drawImage(pic.getImage(),0,0,this);
        public static void main(String[] args) {
           /*adv mpg= new adv();
          mpg.setLayout(new GridLayout(5,1,15,15));
             JFrame window = new JFrame ("dv");
             window.setLayout(new BorderLayout());
             frame.add(mpg, BorderLayout.CENTER);
           window.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);     
           window.add(mpg);
           window.setVisible(true);
           window.setSize (550,225);*/
           adv mpg = new adv();
           JFrame frame = new JFrame();
         frame.setLayout(new BorderLayout());
         frame.add(pic, BorderLayout.CENTER);
         frame.setSize(500, 500);
         frame.setVisible(true);
    }

  • How to add an image in a JPanel

    Hi All,
    How to add an image in a JPanel and make it display.
    Thanks,

    I have tried with the below code. If I there is any fault please correct me.
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class HomePage extends JFrame implements     ActionListener {
        JButton cmdClick;
        JLabel label;
        JPanel homePanel = new JPanel();
        JPanel headPanel = new JPanel();
        JPanel btPanel = new JPanel();
        private JPanel mainPanel = new JPanel(new CardLayout());
        CardLayout cl;
        CalScenario calcFrame = null;
        public HomePage() {
           setTitle("Test Kit");
           setSize( 1008,399);
           setBackground( Color.gray );
           setResizable(false);
           Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
           Rectangle window = getBounds();
           setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
           setVisible(true);
            homePanel.setLayout(new BorderLayout());
            headPanel.setPreferredSize(new Dimension(1008,153));
            label = new JLabel("Main menu");
            headPanel.add(label);
            headPanel.setBackground(Color.CYAN);
            ImageIcon icon = new ImageIcon("images/slash.gif");
            JLabel imglabel = new JLabel();
            imglabel.setIcon(icon);
            headPanel.add(label);
            this.getContentPane().add(headPanel);
            btPanel.setBackground(Color.ORANGE);
            cmdClick = new JButton("Click here");
            btPanel.add(cmdClick);
            cmdClick.addActionListener(this);
            homePanel.add("North",headPanel);
            homePanel.add("West",btPanel);
            calcFrame = new CalScenario(mainPanel);
            mainPanel.add(homePanel, "HomePanel");
            mainPanel.add(calcFrame, "CalcFrame");
            cl = (CardLayout) (mainPanel.getLayout());
            add(mainPanel);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void actionPerformed(ActionEvent source)  {
          if (source.getSource() == (JButton) cmdClick) {
                cl.show(mainPanel, "CalcFrame");
        public static void main( String args[]) {
             HomePage homeFrame = new HomePage();
             homeFrame.setVisible(true);
    }

  • How to add a table(from TableRenderDemo) to a JFrame again

    Hello again:
    Thanks for stephen andrews's adivice, I follow your adivice to add code (it is in
    EventHandeler of DrawCalendar class, and they indicated by ???????????), but it still not work, please check for me why, Thanks.
    My problem
    Please run my coding first, and get some view from my coding.
    At the movement, I got a problem, I have not idea how to add a table(it is from TableRenderDemo) to JFrame when I click on the button(from DrawCalendar) of the numer 20, and I want the table disply under the buttons(from DrawCalendar).
    Please help me to solve this problem, thanks.
    *This program for add some buttons and a table on JFrame
    import java.awt.*;
    import javax.swing.*;public class TestMain extends JFrame{
    private static TableRenderDemo tRD;
    private static TestMain tM;
    protected static Container c;
    private static DrawCalendar dC;
    public static void main(String[] args){
    tM = new TestMain();
    tM.setVisible(true);
         public TestMain(){
         super(" Test");
         setSize(800,600);
    //set up layoutManager
    c=getContentPane();
    c.setLayout ( new GridLayout(3,1));
    tRD=new TableRenderDemo();
    dC=new DrawCalendar();
    addItems();//add Buttons to JFrame
    private void addItems(){
         c.add(dC); //add Buttons to JFrame
         //c.add(tRD); //add Table to JFrame     
    *This program for add some buttons to JPanel
    *and add listeners to each button
    *I want to display myTable under the buttons,
    *when I click on number 20, but why it doesn't
    *work, The coding for these part are indicated by ??????????????
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    public class DrawCalendar extends JPanel {
         private static DrawCalendar dC;
         private static TestMain tM;
         private static TableRenderDemo myTable;
         private static GridLayout gL;
         private static final int nlen = 35;
        private static String names[] = new String[nlen];
    private static JButton buttons[] = new JButton[nlen];
         public DrawCalendar(){
              gL=new GridLayout(5,7,0,0);
              setLayout(gL);
              assignValues();
              addJButton();
              registerListener();
    //assign values to each button
         private void assignValues(){
              names = new String[35];
         for(int i = 0; i < names.length; i++)
         names[i] = Integer.toString(i + 1);
    //create buttons and add them to Jpanel
    private void addJButton(){
         buttons=new JButton[names.length];
         for (int i=0; i<names.length; i++){
         buttons=new JButton(names[i]);
         buttons[i].setBorder(null);
         buttons[i].setBackground(Color.white);
         buttons[i].setFont(new Font ("Palatino", 0,8));
    add(buttons[i]);
    //add listeners to each button
    private void registerListener(){
         for(int i=0; i<35; i++)
              buttons[i].addActionListener(new EventHandler());          
    //I want to display myTable under the buttons,
    //when I click on number 20, but why it doesn't
    //work
    private class EventHandler implements ActionListener{
         public void actionPerformed(ActionEvent e){
         for(int i=0; i<35; i++){
         if(i==20){                  //????????????????????
              tM=new TestMain(); //I want to display myTable under the buttons,
              tM.c.removeAll(); //when I click on number 20, but why it doesn't
              tM.c.add(dC); //work
              tM.c.add(myTable); //???????????????????????????????????????
              tM.validate();
         if(e.getSource()==buttons[i]){
         System.out.println("testing " + names[i]);
         break;
    *This program create a table with some data
    [import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableColumn;
    import javax.swing.DefaultCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TableRenderDemo extends JScrollPane {
        private boolean DEBUG = true;
        public TableRenderDemo() {
          //  super("TableRenderDemo");
            MyTableModel myModel = new MyTableModel();
            JTable table = new JTable(myModel);
            table.setPreferredScrollableViewportSize(new Dimension(700, 70));//500,70
             //Create the scroll pane and add the table to it.
             setViewportView(table);
            //Set up column sizes.
            initColumnSizes(table, myModel);
            //Fiddle with the Sport column's cell editors/renderers.
            setUpSportColumn(table.getColumnModel().getColumn(2));
    * This method picks good column sizes.
    * If all column heads are wider than the column's cells'
    * contents, then you can just use column.sizeWidthToFit().
    private void initColumnSizes(JTable table, MyTableModel model) {
    TableColumn column = null;
    Component comp = null;
    int headerWidth = 0;
    int cellWidth = 0;
    Object[] longValues = model.longValues;
    for (int i = 0; i < 5; i++) {
    column = table.getColumnModel().getColumn(i);
    try {
    comp = column.getHeaderRenderer().
    getTableCellRendererComponent(
    null, column.getHeaderValue(),
    false, false, 0, 0);
    headerWidth = comp.getPreferredSize().width;
    } catch (NullPointerException e) {
    System.err.println("Null pointer exception!");
    System.err.println(" getHeaderRenderer returns null in 1.3.");
    System.err.println(" The replacement is getDefaultRenderer.");
    comp = table.getDefaultRenderer(model.getColumnClass(i)).
    getTableCellRendererComponent(
    table, longValues[i],
    false, false, 0, i);
    cellWidth = comp.getPreferredSize().width;
    if (DEBUG) {
    System.out.println("Initializing width of column "
    + i + ". "
    + "headerWidth = " + headerWidth
    + "; cellWidth = " + cellWidth);
    //XXX: Before Swing 1.1 Beta 2, use setMinWidth instead.
    column.setPreferredWidth(Math.max(headerWidth, cellWidth));
    public void setUpSportColumn(TableColumn sportColumn) {
    //Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Chasing toddlers");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Teaching high school");
    comboBox.addItem("None");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    //Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer =
    new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
    //Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = sportColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the sport to see a list of choices");
    class MyTableModel extends AbstractTableModel {
    final String[] columnNames = {"First Name",
    "Last Name",
    "Sport",
    "# of Years",
    "Vegetarian"};
    final Object[][] data = {
    {"Mary ", "Campione",
    "Snowboarding", new Integer(5), new Boolean(false)},
    {"Alison", "Huml",
    "Rowing", new Integer(3), new Boolean(true)},
    {"Kathy", "Walrath",
    "Chasing toddlers", new Integer(2), new Boolean(false)},
    {"Sharon", "Zakhour",
    "Speed reading", new Integer(20), new Boolean(true)},
    {"Angela", "Lih",
    "Teaching high school", new Integer(4), new Boolean(false)}
    public final Object[] longValues = {"Angela", "Andrews",
    "Teaching high school",
    new Integer(20), Boolean.TRUE};
    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) {
    return getValueAt(0, c).getClass();
    * Don't need to implement this method unless your table's
    * editable.
    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;
    * Don't need to implement this method unless your table's
    * data can change.
    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() + ")");
    if (data[0][col] instanceof Integer
    && !(value instanceof Integer)) {
    //With JFC/Swing 1.1 and JDK 1.2, we need to create
    //an Integer from the value; otherwise, the column
    //switches to contain Strings. Starting with v 1.3,
    //the table automatically converts value to an Integer,
    //so you only need the code in the 'else' part of this
    //'if' block.
    try {
    data[row][col] = new Integer(value.toString());
    fireTableCellUpdated(row, col);
    } catch (NumberFormatException e) {
    JOptionPane.showMessageDialog(TableRenderDemo.this,
    "The \"" + getColumnName(col)
    + "\" column accepts only integer values.");
    } else {
    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("--------------------------");

    http://forum.java.sun.com/faq.jsp#format

  • How to bind JtextFields in Swing to Table fields in the database

    Can some one give the code of how to bind JtextFields in Swing to Table fields in the database
    Am really new to java programming and have interest in learning

    The standard JDK doesn't do this for you. If you search on Google, you may find some 3rd party packages that will do this.
    You need to create your own form add execute the appropriate SQL yourself. Read the tutorial on [url http://java.sun.com/docs/books/tutorial/]JDBC Database Access to get started.

  • How to add a 2D result array to the result database?

    I am using Teststand 3.5 and I am about to create a Labview VI that will measure the gain response of a receiver. This VI will output it as an 2D-Array and I would like to save it to my access result database, to be able to use that data for displaying a graph in my excel report.
    I am new to teststand and I already know how to add a 2D-array to a report but don't really know how to add this information to the database. I read the provided manuals and searched the forums but didn't find anything that was really helpful. AFAIK I can add numerics and strings to the database just by adding a string value or numeric limit test but when it comes to arrays (especially 2D), I have no idea how to do that. I only know (or guess) that I have to add a new  table to my database, edit the schema and the Database.seq.
    I appreciate any help!
    Stephan

    Stephan,
    Sometimes forum posts make you research a particular functionality of TestStand and lead you to discover how powerfull TestStand can be.  This is one of these cases.  I thought that in order to save 2D arrays in TestStand we would have to customize many different aspects of the application only to learn that the functionality is fully implemented already!
    First, you will have to create a new step type that contains a 2D array in the Step.Result properties.
    Second, in order to save a 2D array into a database, use the Binary Column Type in your table.  To do this, create a new table with the following properties:
    Type: Recordset
    Command text: "SELECT * from [Table Name]"
    Apply to: Step Result
    Types to Log: [Step type with which you are acquiring your 2D array]
    Lock Type: Optimistic
    The rest of the properties can be left with their default values.  Once you have your table, add an ID column as your primary key, and a second column that will contain the 2D array.  This column should have the following properties:
    Type: Binary
    Size: 1.5 times the size of your array in bytes
    Expected Properties: Logging.StepResult.[Property Containing the Array]
    Expression: Logging.StepResult.[Property Containing the Array]
    The rest of the properties can be left with their default values.  In order to see the values stored in the database, open the Database Viewer to the particular table and right click on the field which will show a value of "Binary Data".  Right click on the value and select Evaluate Data.  The View Binary Data window will let you see all the values stored in the array.
    Regards,
    Santiago D

  • How to add a border for Panel (jdk 1.1) ?

    how to add a border for Panel (jdk 1.1) ?

    Border's are a Swing feature, you will have to draw one by yourself (extend Panel and override paint()).

  • How to add the data to combobox

    how to add data directly into
    info swing component jcomboboxcontrol in jdevloper.
    can any one help.
    thanks
    sweety

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by pullareddyj:
    u just addlike following method for insert
    data in combobox.
    "comboBoxControl1.addItem("jan");"
    pullareddy<HR></BLOCKQUOTE>
    THANKS
    SWEETY

Maybe you are looking for