File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hide a print dialog while printing a receipt

 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii all,
Need a little help in hiding the print dialog which just appears and disappears in a fraction of second.
here is the code below:

got stuck here.. please help thank you
 
Rob Spoor
Sheriff
Pie
Posts: 20368
43
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply not calling "setVisible(true)" works for me. The only dialog I receive is the save dialog for my PDF printer, but that won't even show when using a "real" printer.
 
Pravin Shirke
Ranch Hand
Posts: 150
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob,
for the reply but its still displaying the print window for a fraction of second then i did this in my code, i have put this code at line number 41 in the code above

using this code the window did not showed up but now the problem is that the title of the current window changes. say if the current window title is ABC it changes to XYZ for a fraction of second.
please helppp. stuck here...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic