aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTABLE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTABLE" Watch "JTABLE" New topic
Author

JTABLE

thisum biddhika
Greenhorn

Joined: Dec 19, 2008
Posts: 3
can anyone please say how to create a spread-sheet using J-Table!
I encountered problems when accessing cells and retreving data by giving cell address.(10x10 spread sheet.)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19695
    
  20

What do you have so far? What are you storing in your table model, and how are you displaying it?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Mikko Kohtamäki
Ranch Hand

Joined: Dec 13, 2008
Posts: 112

I encountered problems when accessing cells and retreving data by giving cell address.(10x10 spread sheet.)

Yes, hard to say anything for that. What you got? Do you have just basic swing table / table model? Or do your cells / rows have a class instance of their own or something like that?

My whole table concept has ~3k lines of code and slowly growing. And it is not spread sheet model and will not be, well auto-create columns and functions are missing (replaced with other features).
[ December 19, 2008: Message edited by: Mikko Kohtam�ki ]
thisum biddhika
Greenhorn

Joined: Dec 19, 2008
Posts: 3
similar to a excel, but very simpler than that.

In each cell we have to store a literal integer value, a referential integer value (that is, a reference to the value stored at another cell) or an equation.

A referential integer value is stored as a string that starts with the symbol "=" followed by the target cell address expressed as a string.

An equation is entered as a string that starts with the symbol "=" and is an expression that may contain the operators "+", "-", "*" and "/" for addition, subtraction, multiplication and integer division. An expression may also contain the symbols "(" and ")" for group of sub-expressions but without nesting. The values in an expression may be literal integers or a reference to a value stored at a cell. The expressions are evaluated left-to-right without any specific operator precedence order. But sub-expression precedence is maintained.

A cell may store the special function "sum", which is the summation of values in a range of cells (either column-wise or row-wise). This special equation is represented as a string "=sum(start_address..end_address)".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTABLE