• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Print to File

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 questions about print to file with java.awt:

1) With Java 1.4, when I use setFileName in the JobAttributes class, as soon as the user clicks on Print to File, this file name shows.
However, with Java 1.5, this file name does not show, a different file name shows. The reason why I want my file name to show is that I need a specific extension.

2) With Java 1.4, if in the window that comes up after clicking on Print to File, the user selects a specific directory where to save the file, the next time the user does a Print to File, the same directory comes up.
However, with Java 1.5, the selected directory is not remembered.

I do need to use java.awt, I cannot use javax.swing, because for printing to the printer, I need to call my own paint. Also, I need to use Java 1.5.

Please help, especially for question 1)

Thanks a lot!
 
Brigit Ananya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main problem was that the file name that I set in the JobAttributes class does not show in Java1.5, although it does show in Java 1.4.

For being able to see the file name should I just use:
FileDialog fileDialog = new FileDialog(frame, "out.eps", FileDialog.SAVE)
and where would I have to put this fileDialog?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic