Link to home
Start Free TrialLog in
Avatar of sdinfosys
sdinfosys

asked on

How to Print JTable Completly

Dear Friends


I Created a JTable which shows me the report for a month.
i.e it contains 31 colums + 2 more colums.
when i get display i am getting it but they are being overlapped i.e the
colums are shrinking and i cant view the display. Offcourse i could
view it byu dragging . But when i am printing this table iam getting
the shrinked table only. I want the complete print out.
The container i have used is the max size the screen can accomidate.
so how to get the complete printout.
Please anyone help me.
I am in a great urgent.


bye
prasad

ASKER CERTIFIED SOLUTION
Avatar of kylar
kylar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sdinfosys
sdinfosys

ASKER

Dear Kylar


Thanks a lot for ur instant reply

I had user the
JScrollPane = new JScrollPane(table);

where table is my JTable.

I am getting vertical scroll bar but not horizontal.
what all the program u gave i am having it.
so please solve my problem.

it is very urgent.


bye
thanks in advance
prasad
The problem is that a scrolled jtable will always re-size itself to fit in the horizontal area provided. You need to iterate through the columns and re-size them, and turn the JTable's auto-resize of columns off.

Kylar