Results 1 to 2 of 2
  1. #1
    zikojam is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default Getting integer values from a JTable

    Hello

    The table's cells contain integer values. I would like to save each one of theme them in an array of integers.
    The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages.
    I tried something like:
    Java Code:
    Object o = table.getModel().getValueAt(i, j);
    a[x]=Integer.parseInt(o.toString());
    Please help.
    Thank you. :)

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    7

    Default

    Rose India

    You will get hammered for cross-posting, I am just interested in the problem and the code to make it work.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. Integer length
    By jithan in forum New To Java
    Replies: 1
    Last Post: 06-12-2008, 03:35 PM
  2. Replies: 0
    Last Post: 05-22-2008, 10:53 AM
  3. Replies: 2
    Last Post: 05-15-2008, 10:15 AM
  4. Replies: 4
    Last Post: 04-15-2008, 01:04 PM
  5. Integer vs int
    By bugger in forum New To Java
    Replies: 1
    Last Post: 11-14-2007, 09:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •