Results 1 to 9 of 9
  1. #1
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default Print a receipt to screen

    Hie guys a quick question, I hope you can help.

    I am working an shopping cart GUI. All is almost finished but for one thing. I want to print a receipt to the screen. In a sort of pop up box that the user can close. I already have all the code to print this but the only perplexity is what actually to use to print out the screen.

    Any suggestions please.

    Thank you in advance for you advance for your time and replies.

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You can use a jdialog or just create a new window which contains everything.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

  4. #4
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    I want a light weight something that can allow me to print receipt to a pop us box when a button is clicked. I am not sure if that makes any sense.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

  6. #6
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    Yes yes, a JOptionPane would be great. How would a I get a JOptionPane to print out something so long, perhaps up to 30 lines. When I say how I mean what method would I call on it, surely not .showMessageDialogue ?

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Again, the details are important. What is holding 30 lines? A JTextArea? If so, then put it into a JScrollPane and display them in the JOptionPane.

    I think that your problem with this thread is that you're still not telling us a lot of important details, details that are necessary for us to be able to help you. Start out by assuming that we know absolutely nothing about your project or your current needs, and then craft your question from there.

  8. #8
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    Thanks guy it worked. I googled how to implement you advice and it worked. The link I found helpful is here

  9. #9
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

Similar Threads

  1. Replies: 11
    Last Post: 03-09-2011, 08:18 AM
  2. Receipt project....(Beginner plz help)
    By waklo99 in forum New To Java
    Replies: 0
    Last Post: 03-16-2010, 07:48 AM
  3. Blank Screen while navigating from one screen to another
    By mohana.krishna in forum Java Servlet
    Replies: 0
    Last Post: 03-03-2009, 05:03 PM
  4. print on the client screen
    By a_maged in forum Networking
    Replies: 0
    Last Post: 12-17-2007, 04:10 PM
  5. Replies: 1
    Last Post: 08-07-2007, 05:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •