Debby Miller

Greenhorn
+ Follow
since Feb 29, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Debby Miller

Never mind on my question, I just didn't have the borders set right. Thanks for not burning me at the stake
12 years ago
That was a different program when I asked about an image not showing up, he said I had a God class, too many variables, to change the == to .equals, and to stay away from using 'this' as the listener. I did that stuff.. well I'm still learning about how to create a different class as a listener.. but anyway, am I missing something? Does what he said in that last post have to do with this one? Or was I supposed to post them both in the same place even though they are different programs/questions? Sorry I'm new to Java and to this site. Thanks in advance!
12 years ago
When I run this program, the window pops up and everything is smooshed (for lack of a better term) together. How do I change the size of it? I'm using GridBagLayout. Thanks in advance! Here is my code:
12 years ago
Well, what happened was I wrote the program at home implementing new stuff I learned at school, so every time I learned something (i.e. if-else statements) I would add it to the program. The problem with that is when I learned about using swing and GUI business I didn't know what to do with the rest of my code. So I just commented it out for now, which is why I had all those extra variables. As far as the God class problem is concerned, I've been thinking about how to break it down into separate classes and methods, but not sure where to start. I changed all the == to .equals, thank you for the heads up. I'm trying to figure out how to create my listeners as separate classes, but to do that I think I need to really understand what a listener is first. My book has a paragraph on it, so I think I need to read more on the internet. This place is soo much nicer than the other forum I was introduced to, thanks again for all your help.

~Debby
12 years ago
Thanks! I'm super new (obviously). You bring up some really great points. I'll work on the stuff you pointed out first, and then come back if my question is still relevant. BTW this place is awesome!
12 years ago
My image isn't showing up as a label on my GUI business. Do I have something in my code overriding it? Did I code it wrong? My other program with an image as a label works fine. I have verified that I'm using the correct file, and file extension, and that it is in the correct location. As far as research is concerned, I've been reading about ImageIcon to see if there is anything that clashes with it, as all the book does is skim (at best) over graphics in GUI's. Am I even looking in the right place? Thanks in advance for any help/advice you can offer.



[Edit - added code tags - see UseCodeTags for details]
12 years ago