Drawing over an awt canvas
Page 1 of 112 Replies - 433 Views - Last Post: 17 June 2010 - 09:15 PM
#1
Drawing over an awt canvas
Posted 17 June 2010 - 07:53 PM
Replies To: Drawing over an awt canvas
#2
Re: Drawing over an awt canvas
Posted 17 June 2010 - 07:56 PM
#3
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:06 PM
#4
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:09 PM
Canvas are the only component for which you can invoke the createBufferStrategy() method if you want to draw of screen.
Mostly used in game programming when you draw of screen (that might take some time) and when your drawing is done, you just switch which Canvas is shown avoiding all possible flickering.
If everybody were using Canvas for drawing, we wouldn't have all these flickering questions in the forum.
This post has been edited by pbl: 17 June 2010 - 08:52 PM
Reason for edit:: Typo
#5
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:09 PM
Edit: pbl had additional information that invalidated my first sentence.
This post has been edited by macosxnerd101: 17 June 2010 - 08:11 PM
#6
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:22 PM
macosxnerd101, on 17 June 2010 - 07:09 PM, said:
Edit: pbl had additional information that invalidated my first sentence.
My friend is taking an awt based applet (a game). He wants to draw onto that canvas.
#7
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:25 PM
And also, if you have performance issues, Canvas is the fastest component ever written. That is why they never made a JCanvas.
Manbearpig101, on 17 June 2010 - 09:22 PM, said:
Post your code. If there is no performance issues macosxnerd101 suggestion to go to Swing is still valid.
#8
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:39 PM
Quote
Probably also the reason Sun adapted Canvas for Java ME for mobile devices.
#9
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:41 PM
pbl, on 17 June 2010 - 07:25 PM, said:
And also, if you have performance issues, Canvas is the fastest component ever written. That is why they never made a JCanvas.
Manbearpig101, on 17 June 2010 - 09:22 PM, said:
Post your code. If there is no performance issues macosxnerd101 suggestion to go to Swing is still valid.
As much as I like posting code, my friend is impartial to me posting it.
=\
#10
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:42 PM
#11
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:46 PM
Manbearpig101, on 17 June 2010 - 09:41 PM, said:
So "mechanics fix my car but do not open the hood"
But your friend might be right, the FBI, the CIA, the Mossad, the North Corean secret services, the RCMP, the French 2nd bureau, even the Lybians monitor this site everyday so they can see if they cab steal cheap code.
This post has been edited by pbl: 17 June 2010 - 08:55 PM
Reason for edit:: Typo
#12
Re: Drawing over an awt canvas
Posted 17 June 2010 - 08:54 PM
macosxnerd101, on 17 June 2010 - 09:39 PM, said:
Quote
Probably also the reason Sun adapted Canvas for Java ME for mobile devices.
Why re-inventing the wheel. Cheap and easy to implement simple component with a very low footprint.
#13
Re: Drawing over an awt canvas
Posted 17 June 2010 - 09:15 PM
@Manbearpig101: I'm going to close this thread since you aren't able to post code, so there's no reason to keep it open. If this changes, feel free to PM me, along with a link to this thread, and I'll be happy to reopen.
|
|

New Topic/Question
This topic is locked




MultiQuote







|