Table in AWT

S

Selie Peter

Hello,

Does anybody know a way to use a Table in AWT? (something like JTable in
Swing)
(I'm extending an existing application on a PDA so I can't use Swing)

TIA
 
T

Thomas Weidenfeller

Selie said:
Does anybody know a way to use a Table in AWT? (something like JTable in
Swing)
(I'm extending an existing application on a PDA so I can't use Swing)

Java SE doesn't have one. You need to write your own component, or
obtain one (Google ...) form a third party.

/Thomas
 
R

Roedy Green

Does anybody know a way to use a Table in AWT? (something like JTable in
Swing)
(I'm extending an existing application on a PDA so I can't use Swing)

there are no table Components in AWT. You would have to roll your own
something like JTable, perhaps much simpler and less general.
Basically you write a Canvas and when you get a paint event, you paint
that clipregion. Basically you use division of the x/y co-ordinates
to compute which cells need to be repainted, then you paint them
probably with drawString. When you are done you can plop your canvas
in a ScrollPane.

I was going to say look at the code for JDisplay to see how, but I
have not yet released that code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top