#Need help with Custom Java Graphics class
1 messages · Page 1 of 1 (latest)
What graphics framework are you using?
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
Did that answer your question?
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
What namespaces are included at the top of your file
Let me show ya
This is my package (and imports) for this class
And this applies to this class (the one where I make the constructor)
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
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
why would you wanna make the content pane invisible? the content pane holds all the contents of the frame