This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!