Results 1 to 1 of 1
Thread: Print whole canvas drawings
- 09-30-2011, 09:03 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 59
- Rep Power
- 0
Print whole canvas drawings
I have a problem with print everything of a canvas class. I explain you in details..........
I have two classes, suppose A and B. A class extends JApplet and implements all the listeners. B class extends Canvas class for drawing different geometrical shapes.
I have created an object of B class within A, and within actionPerformed() method of class A, I want to execute some code for printing all the drawings of Canvas class(B class). For this I have used getPrintJob(Frame frame, String title, width, height) method. But the problem is, getPrintJob() supports Frame object as its first parameter, neither JApplet nor Applet object.
But I need JApplet or Applet, bcoz Its need to run within browser. And another thing is, all the geometrical shapes are in 2D. //(Graphics2D)
So how can I solve it? Please give me suggestion and if it is possible for you, then provide me a working sample code.
Thanx................
Similar Threads
-
Need help for my application: Stroke Class & Free hand drawings
By JavaIsChallenging in forum AWT / SwingReplies: 0Last Post: 09-23-2011, 06:17 PM -
SWT Canvas drawing realtive to image space not canvas space.
By bobbie in forum SWT / JFaceReplies: 0Last Post: 07-05-2009, 12:31 PM -
Print the text file and print preview them
By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:04 PM -
Help using Buttons/Actions with Drawings
By Deathmonger in forum New To JavaReplies: 0Last Post: 04-08-2008, 03:11 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks