aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to prevent image from disappearing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to prevent image from disappearing? " Watch "how to prevent image from disappearing? " New topic
Author

how to prevent image from disappearing?

Bobby Marvikuan
Ranch Hand

Joined: Mar 14, 2012
Posts: 54
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???
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
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

Joined: Mar 14, 2012
Posts: 54
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
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Lol dunno this is what I get after decreasing

keep going - you're 10% there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to prevent image from disappearing?