Page 1 of 2 12 LastLast
Results 1 to 20 of 21
  1. #1
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default JTable Calculation libraries

    hello world
    Last edited by shy_ted; 09-24-2010 at 04:20 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    So the data is sent in Excel format?
    Or what?

    If Excel then you're looking at POI, JExcel, or one of the pay for license ones.

    If not, then you'll have to say what the output is.

  3. #3
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    hello world
    Last edited by shy_ted; 09-24-2010 at 04:20 PM.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    If this is just a data dump from the db, who cares what the users do with it?

    You need to know what format this is supposed to be in before you can go anywhere with it...I assume that's in some requirements spec?

  5. #5
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    hello world
    Last edited by shy_ted; 09-24-2010 at 04:20 PM.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    So when you say "spreadsheet" above in the OP, you meant you were having to write the spreadsheet code, and you weren't simply exporting the data as a spreadsheet...because that was far from clear from that post.

    So, at the moment, you want to make your own cut down version of Excel?
    Or is it simpler than that?

  7. #7
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    hello worldto look.
    Last edited by shy_ted; 09-24-2010 at 04:20 PM.

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    OK.
    You may be able to use POI. I've not done this (I've only imported from and exported to excel files). There are methods for adding formulae to a cell, and then you can get the non-formula value from that Cell object.

    I suspect you'd therefore have a POI Workbook with a Sheet sat behind your JTable. Anything the user enters into the front gets passed on to the Sheet, and any results are passed back to be displayed on the JTable.

    How you wire these two things together is a task...I assume some form of table model, but it';s not something I've done and there are others here better at Swing than I am.

  9. #9
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default

    I have the feeling that this is all the wrong way around: excel is good at manipulation cells so leave that to excel and don't try to mimick it. Excel doesn't seem so good at other things so you should try to take care of that.

    kind regards,

    Jos

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    That would be my view, but it sounds like this is a project from their tutor...so anything goes.

  11. #11
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    hello world
    Last edited by shy_ted; 09-24-2010 at 04:20 PM.

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    Which does beg the question of whether this is actually what they want.

  13. #13
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    a hello world
    Last edited by shy_ted; 09-24-2010 at 04:21 PM.

  14. #14
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default

    Note that the Excel computable 'paradigm' (I like writing that word ;-) is quite a limited one and mainly targeted at the visualization of simple algebraic calculations. If the model of those cells comes from somewhere else (something that doesn't know about that paradigm (I did it again!) you are not forced to do your calculation in that paradigm (my nipples explode in delight!) either. Just the result of your calculations need to be exported to that bloody excel format; POI or jExcel are perfect for that. If I were you I'd stay as far away as possible from that excel paradigm (aaahhhh).

    kind regards,

    Jos ;-)

  15. #15
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    hello world work and is simple?
    Last edited by shy_ted; 09-24-2010 at 04:21 PM.

  16. #16
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by shy_ted View Post
    ok,

    what if i said i just want the cells in jtable to be able to perform calculations?

    would that make it easier to suggest something thatll work and is simple?
    So you want to be able to perform rudimentary Excel-like calculations? You have to write an expression parser and interpreter (constants, cell references, operators etc.) and extensive checks to avoid cycles in the evaluation (e.g. A1= B1+1; B1= A1+1). That'd be quite a task ...

    kind regards,

    Jos

  17. #17
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    Ask your tutor what library it is they are expecting you to use, since they said that there was one available on the web.

  18. #18
    shy_ted is offline Member
    Join Date
    Sep 2010
    Posts
    19
    Rep Power
    0

    Default

    we are supposed to find it, so i thought where better to ask than a java forum for some help....

  19. #19
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default

    The only thing I can think, if they mean for you to mimic Excel functions, is POI.

    The thing is, I doubt there are many people who would bother to write their own spreadsheet software.

  20. #20
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,679
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by shy_ted View Post
    we are supposed to find it, so i thought where better to ask than a java forum for some help....
    After googling for 37 seconds I found this link. (I googled for "Java spreadsheet").

    kind regards,

    Jos aka your friendly Google service

Page 1 of 2 12 LastLast

Similar Threads

  1. Help with the calculation of a variable.
    By rarschach in forum New To Java
    Replies: 14
    Last Post: 01-24-2010, 03:50 PM
  2. Need help with doing a calculation in Java
    By John D. in forum New To Java
    Replies: 6
    Last Post: 02-25-2009, 12:44 AM
  3. Delay on inputs during calculation
    By matt_well in forum New To Java
    Replies: 14
    Last Post: 07-26-2008, 05:17 PM
  4. Area Calculation: Add, Substract, XOR
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 12:08 AM
  5. Problem with Calculation ....
    By danny000 in forum New To Java
    Replies: 1
    Last Post: 04-15-2008, 03:42 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
  •