Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Printing reports in AWT

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about just using a Panel with GridLayout containing Labels or TextFields?
 
reply
    Bookmark Topic Watch Topic
  • New Topic