This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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