• 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

printing to a form

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to design a program that has a interface a user can enter a information and after the info is entered the user to then print that info to a form. A example of this is if a user wanted to fill out a credit card app. but was worry about making a mistake...they could enter the desired infomation and then have it printed to the hard copy form. Can I do this in Java? If so how and what will I need?
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, you can do just about anything in Java. At the risk of a flamewar, that doesn't mean that Java is the best language for all tasks. I personally enjoy using it, though, and will (usually) go through the struggle with Java rather than learn a new language that I don't already know.
With that said, you first need to create the user inteface to get the information. You can use either the AWT or Swing classes. I'm sure there is a lot of information on the Net to learn these. I would also suggest that you buy a book that helps you along.
Once you have the GUI done, you need to use the Java Print API to do the printing. This is probably the trickiest part because you need to make sure the output is positioned correctly and that the positioning code is portable between different printers. I haven't used the Print API before, but I am pretty sure you can at least accomplish the first. The second issue will be really tough to completely solve.
HTH
Layne
 
reply
    Bookmark Topic Watch Topic
  • New Topic