• Post Reply Bookmark Topic Watch Topic
  • New Topic

Flickering on resize  RSS feed

 
David Schmidt
Greenhorn
Posts: 15
Eclipse IDE Slackware Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a program that draws a graph, but for now, all I have done is two lines: the X and Y axis.
The program is designed in a way as to automatically resize the graph when the window is resized.

Is this code in some way extremely inefficient? I get TERRIBLE flickering when I resize the window, and it
really annoys me. Is there any way around this problem, or something that will at least reduce the flickering?
This is important. Any help is greatly appreciated. I will also add that I have a very high-end PC.

mainApp.java:


GraphPanel:


I have added a screenshot that shows the window flickering.
ScreenshotDuringResize.png
[Thumbnail for ScreenshotDuringResize.png]
 
Stephan van Hulst
Saloon Keeper
Posts: 7817
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't flicker for me.

As an aside, it's better to add the panel before you show the frame.

Also, don't call your program mainApp, call it MainApp.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!