Results 1 to 6 of 6
- 06-12-2012, 08:10 AM #1
Member
- Join Date
- May 2012
- Posts
- 15
- Rep Power
- 0
How can you stop flicker on image change?
Hi, I have created an application that has a class extended from JPanel that lets me change image being displayed with overriding draw method. Every time a button is pressed the image being displayed in that panel will change. When this happens there is a very noticable flicker.
I thought it might have been because I am overriding paint in that one customised JPanel class but I commented it out and the issue happens all the same when an image would have been changed.
If anyone could help me figure this out that would be very helpful. I tried to detail the situation so that I wouldn't need to post any code but if the case is that I do just say so.
It's not quite what's going on in this link
JAVA CODE SPOT: JAVA : Flickering Problem In Paint Method, it only happens when the button that would change the pic is clicked.
- 06-12-2012, 02:26 PM #2
Re: How can you stop flicker on image change?
Can you make a small program that compiles, executes and show the problem?
If you don't understand my response, don't ignore it, ask a question.
- 06-13-2012, 12:48 AM #3
Member
- Join Date
- May 2012
- Posts
- 15
- Rep Power
- 0
Re: How can you stop flicker on image change?
I don't have time to do that until after tomorrow but if thats what I need to do to be helped I will do it then. Thanks for the reply.
- 06-13-2012, 08:21 AM #4
- 06-13-2012, 08:40 AM #5
Member
- Join Date
- May 2012
- Posts
- 15
- Rep Power
- 0
Re: How can you stop flicker on image change?
I did a quick google search and this link is kinda like what I'm doing
Java Swing: how to add an image to a JPanel? - Stack Overflow
If JPanel doesn't have a draw method what is it overriding then?
- 06-13-2012, 01:48 PM #6
Similar Threads
-
Change background image
By Jeffrod in forum AWT / SwingReplies: 2Last Post: 08-12-2011, 02:14 AM -
change image
By mysa in forum Java AppletsReplies: 7Last Post: 09-01-2010, 03:51 PM -
Change dimension of image
By cselic in forum AWT / SwingReplies: 3Last Post: 08-29-2010, 09:23 PM -
Use stop button to stop moving (stop timers) on JPanel
By mneskovic in forum New To JavaReplies: 3Last Post: 07-23-2010, 12:50 PM -
Javascript change image
By butsags in forum New To JavaReplies: 1Last Post: 12-10-2009, 11:08 PM
Bookmarks