#Need help with Custom Java Graphics class

1 messages · Page 1 of 1 (latest)

quartz loomBOT
#

<@&987246399047479336> please have a look, thanks.

daring cipher
#

What graphics framework are you using?

quick lance
#

It's really weird...Also disclaimer, but I'm doing a project and my professor made a custom class, so its not Jframe...

My code looks like this by the way... I can move the image, but I can't size it and as you can see, the background is white...The image moves without the white background, so I assumed the contentPane is the problem...I just have no idea whatsoever, so uhh..This is a cry for help

quick lance
#

I don't have much code as of yet

#

Here's the class (that I used to make the constructor)

I'm basically making a matching game and literally all I want to do is at least have the pictures on the screen lol

daring cipher
#

What namespaces are included at the top of your file

quick lance
#

Let me show ya

quick lance
quick lance
#

Sorry if its all over the place, but basically, the package consists of custom classes so its not using the standard methods and such

#

I'm under the assumption that you don't have much to work with here, but basically, I see no method that can make the contentPane invisible

#

So I was wondering if maybe the way I went about constructing my code was weird

#

Need help with Custom Java Graphics class

daring cipher
#

Yeah so your teacher wrapped up somthing in awt and swing for your picture class.

A quick google search "how to make something invisible with awt and swing" reveals that there's usually a setVisible method available as an instance member of a class. Do you see such a method?

#

Is the goal to make it invisible or to make it go away? You could always remove it from the window that's displaying it

proud canopy