create a table in which the user can input values

edited September 2014 in How To...

Hello,

I am new to processing, and my only programming experience is with arduino and some basic matlab for university. I am hoping to create a gui for data to be passed to the arduino.

I am wanting to have a table which will accept user input, which can be tabbed between and which the user can also click into. The table will be two rows with an infinite number of columns (as the end of the column is reached a new box is created).

I was sure that something similar would have been created and available, but i cant find it which makes me think that I am not searching using the correct terminology.

Any suggestions?

Answers

  • Is there a reason you're using Processing for this instead of Java? This would be trivial with a JTable in Java.

  • I'm not sure really, It was suggested to me by a lecturer that as I have some experience of using arduino, he said that it would should be an easy transition to Processing. I'll have a look into Java.

    Thanks!

  • Some crude JTable sample from http://docs.oracle.com/javase/tutorial/uiswing/components/table.html "working" in Processing: :@)

    // forum.processing.org/two/discussion/7325/
    // create-a-table-in-which-the-user-can-input-values
    
    import javax.swing.JTable;
    import javax.swing.JScrollPane;
    
    size(600, 500, JAVA2D);
    noLoop();
    
    JTable table = new JTable(100, 2);
    JScrollPane scroll = new JScrollPane(table);
    table.setFillsViewportHeight(true);
    add(scroll);
    
Sign In or Register to comment.