This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

how to prevent image from disappearing?  RSS feed

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a class(very big) which draws an image using paintComponent method but when I am resizing the image disappears. Can anyone suggest me a way to prevent this? I cannot use method drawImage because it is looping through and draws each time a new square to make a crossword. So, if I would use it will draw each time a new Image is there a way to do that or no???
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make a class (a very little class) - just a
frame and panel (for your drawing code).

make sure it demonstrates the same problem
then post that code.
 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Michael Dunn wrote:make a class (a very little class) - just a
frame and panel (for your drawing code).

make sure it demonstrates the same problem
then post that code.


Lol dunno this is what I get after decreasing
 
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say your problem is with drawing an image, but the code you posted doesn't have anything related to drawing an image.

It does have a whole nunch of unused imports which just add clutter, and would have been better removed before posting here.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Lol dunno this is what I get after decreasing

keep going - you're 10% there.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!