• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java print!

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am testing on java print from java tutorial of sun. I have a problem following: I would like to print all text page in my program, but printer only print one page.
Here is code:


When i run this program in eclipse, the result is:


Line 1
Line 2
....
Line 50


But when i print it by printer that only print one page.

Line 1
Line 2
....
Line 41


So for now i want to print all text page. Please help me and sorry for my bad english
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a little difficult to see what exactly you are trying to do and what your processs of mental aquisition is: I suggest three items of action:
  • Provide the uniform resource locator for the tutorial you are studying.
  • examine the if(page > 0 ) portion of code, sounds backwards.
  • Where does print(Graphics g, PageFormat pf, int page) come from, the tutorial ?
  • Where is frameToPrint developed ?
  • Check return from job.printDialog(); by testing if can

  • It appears by your code and problem that simple continued study will reveal incremental progress and continue your forward path.
     
    Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic