Automatic digest processor <[EMAIL PROTECTED]> on 07.08.99 09:11:39
Please respond to Discussion list for Java 2D API
<[EMAIL PROTECTED]>
To: Recipients of JAVA2D-INTEREST digests <[EMAIL PROTECTED]>
cc: (bcc: Ron Kastner/DVO/LVM/DE)
Subject: JAVA2D-INTEREST Digest - 5 Aug 1999 to 6 Aug 1999 (#1999-40)
> Hi,
>
> Before everyone says "thats not graphics thats Swing" let me explain...
>
> I have a JFrame onto which I'm painting a few GeneralPath objects, in
fact I
could have 40,000 of them (no joke) and I want to display them in the cells
of a
JTable. Of course when I assign them to the table model (behind the JTable)
all
I end up with is the string value of the JFrame object displayed in the
table. I
have now reached the point of being lost - Is this is a matter of getting
the
ColumnRenderer right? if so, how? - Is there more to it?
>
> Just for the sake of context I'm trying to build an alignment editor for
hieroglyphic texts (not a word processor) here each column is a variant of
the
same text, each cell is a slot for a word. Each JFrame represents a full
word
(each glyph is a GeneralPath object). The aim is for users to be able to
"pull"
the words of the different variants into alignment (taking into account
such
things as missing or extra words which will make for slight differences
between
the texts) but first I need to be able to display the words in the JTable.
>
> All suggestions gratefully received - all examples of something similar
devoured raw!
>
> - Spencer
------------------------------
Dear Spencer,
You might look at the following adress:
http://www.codeguru.com/java/Swing/JTable/index.shtml
There is an example that shows how to use any JComponent in a JTable...
I don�t know if it works for JFrame because JComponent is not in the
hierachy of it.
Another way might be:
Develop your own JPanel which paints itself in the same way a JFrame does.
(override the paintComponent method).
JTable works fine with a selfwritten Renderer that displays Panels.
best regards
Ron