-4

I an new in Java. I need to print exactly the screen of the JPanel which has the label has image. Would someone provide the link or guideline for me to study. Thanks in advance.

user819774
  • 1,456
  • 1
  • 19
  • 48
  • For [example](http://stackoverflow.com/questions/12764634/printing-a-jframe-and-its-components/12765916#12765916), [example](http://stackoverflow.com/questions/22241711/setting-print-size-of-a-jlabel-and-put-a-jradiobutton-on-the-print/22244116#22244116) and [example](http://stackoverflow.com/questions/22241711/setting-print-size-of-a-jlabel-and-put-a-jradiobutton-on-the-print/22242658#22242658) – MadProgrammer May 01 '14 at 22:59
  • 1
    Do you mean you want to display a Window on the screen with a JPanel and a JLabel or do you mean you want to print a `JPanel` with a `JLabel` in it to a printer? – MadProgrammer May 01 '14 at 23:07
  • @MadProgrammer, I want to print it to a printer. Thanks for your example to guide me to learn. – user819774 May 02 '14 at 16:28

1 Answers1

0

Try this one or just use google with "java swing tutorial" or "java awt tutorial": http://zetcode.com/tutorials/javaswingtutorial/firstprograms/

Kuba
  • 41
  • 3
  • 1
    1- It has nothing to do with printing the components to a printer and 2- Uses `null` layout which makes an incredibly bad example – MadProgrammer May 01 '14 at 23:01
  • 1 - I'am pretty sure, that he was thinking just about displaying (printing) this on screen. 2 - I fully agree with this, it was first link from google. I think that that for creating JButton on on JPanel is good almost every tutorial, at least at the very beginning – Kuba May 01 '14 at 23:04
  • I'll take the first point as been a difference between how we read it then. – MadProgrammer May 01 '14 at 23:06
  • No agree, it's unclear, my first point is mute till proven otherwise ;) – MadProgrammer May 01 '14 at 23:12
  • Ok, he admitted, that was thinking about using a printer, I agree with you:) – Kuba Jul 28 '14 at 10:50