I've been googling all day, just trying to figure out how to show an image. My code is distilled from a dozen diferent web pages, only using things I think I might understand. Obviously, I don't really understand any of it. How do I make this work?

You are looking in the wrong spots. I recommend to all people new to Java, read the ENTIRE tutorial http://java.sun.com/docs/books/tutorial/index.html. The specific section that answers your question is Creating Graphical User Interfaces->Creating a GUI with Swing. You should still do the whole thing.

Ok, I'm reading that section, and I've read other parts of that tutorial before, as applicable.Why does the paintComponent method run? I do not see any place that calls it.Mine now has the oval too high, like the title bar is covering the top of it, I'm not sure why yet.Thanks.

Read it from the start to the finish. Some parts build on information presented before it.

paintComponent is called internally. When you start a Java any program the event dispatch thread is started automatically. This is where you get event notifications such has keyboard or mouse events or other things like window events. This is also where all painting methods are called. In each swing component paintComponent is called from paint.

If you don't know this, you shouldn't be messing around with images yet. Stick with console-based stuff until you learn the ins and outs of the programming language you're using. If you had a lot of programming experience, you'd be able to learn a new language in a day or two, but if you don't know extends then you're probably a lot more than just a Java newbie.

I'm still a bit confused about the paintComponent method. So it comes up automatically, and I call any methods for drawing things from within it?

Look, the AWT Event Thread calls f.paint(). You tell it to start doing this when you call f.setVisible(true).

f.paint() calls the paint(g) method of Test because you put the Test object into the JFrame with f.setContentPane(new Test()).

The paint(g) method of Test calls the paintComponent(g) method of Test. That's how it gets called.

You have to either read a tutorial. You could buy a book about Swing as well, but the Java Tutorial is a good source for information about Swing. Spending a couple of days reading the tutorial is the only way you're ever going to understand. Asking random questions isn't effective.

For actual game programming, I would suggest reading Developing Games in Java and/or Killer Game Programming in Java. However, they don't really address the basics of Swing too much.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org