• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing reports in AWT

 
steve roberts
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I've got a uni assignment and needs my application to be done in AWT only.
I've got a reports section which needs me to print out reports to a screen. How can this be done with JTable???
anyone help???
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can use AWT only, then why are you using JTable?
 
steve roberts
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops....sorry have forgotten that JTable belongs to swing.
Any idea of any methods to display column reports in AWT???
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are having to stick with AWT then I would suggest one of 2 things. You could simply use the print method of whatever component you are needing to print.
A better option for you though would be to use the iText API which allows you to create PDF's. Of course this is if PDF's will be acceptable. I have used iText inside my servlets for generating reports. It is a very simple API and very powerful. Jasper Reports and JReports both use the iText API for their PDF generation. You could use Jasper or JReports, however, I beleive they rely on a few SWING components.
 
steve roberts
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any AWT components in 1.4 could display proper text in report column format.
could i use list or textarea??
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about just using a Panel with GridLayout containing Labels or TextFields?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!