• Post Reply Bookmark Topic Watch Topic
  • New Topic

Free graphic memory ?!  RSS feed

 
Kevin Onik
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends.
I have a JPanel that displays on the screen,( let the user set some changes
to the program) then when the user clicks on a button I use
myJPanel.setvisible(false) to hide it . Now the problem is
sometimes something like the shade of that panel (!?!) keeps appearing on the screen! this is not the bug with my graphic card or something else . I had heard a there is method to free the memory JVM used for diplaying the panels or frames & can use it when there is no need for that panel or ... . Can anyone help me?

thanks.
 
Eric Snell
Greenhorn
Posts: 28
Java Mac MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Invoke dispose() on the Frame when you're done with it. It is not sufficient to hide it. Dipose causes the native resources to be freed.
 
Kevin Onik
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thank you for your reply
I have tried it but the problem is still there! :roll:


any other suggestions please?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!