Very good!
My bad --- I misread your suggestion. You correctly said: But I misread that as saying
Moving my paintAgain call into paintComponent was the right call. I can't thank you enough,...
Type: Posts; User: pict3000
Very good!
My bad --- I misread your suggestion. You correctly said: But I misread that as saying
Moving my paintAgain call into paintComponent was the right call. I can't thank you enough,...
Norm - I did post complete code that compiles. Look at the beginning of this thread. But after I made changes suggested to me, I posted the new code because now it wouldn't compile - to get help...
I like that plan. I think that, and several pieces of pizza, ought to work. You're a titan, Curmudgeon.
Norm - Here, removing that code doesn't improve or detract. The code I posted here is just a...
I've tried that. Without that g arg, the code looks fine. It should work. That's what's so weird.
I'll make it work. Thanks for your time.
It uses its arg the same way paintComponent does. It immediately converts the Graphics context to a Graphics2D in order to draw into the BufferedImage.
As far as paintAgain(g) is concerned, having...
That's not true at all. I'm just new to drawing and I don't understand how to get the BufferedImage "art" into a graphics context outside of paintComponent(). I've tried getGraphics() for a Graphics...
Two reasons:
1) Because Curmudgeon suggested I take all of my drawing out of paintComponent. Here's what he said: Please see his post above. And...
2) Because later I want to be able to call...
@Curmudgeon -
While implementing your suggestions I ran into this problem: the compiler won't let me call paintAgain() from the constructor. Here's the error message:
./PixelPainter.java:26:...
Your always a big help, Curmudgeon. Thanks again.
To answer your "why's": Because for me there doesn't seem to be the kind of impressive online tutoring documentation that effectively articulates...
Sometimes it correctly displays my BufferedImage drawing, but if you run the program a few times, it ceases to display anything.
I've vastly simplified the compilable code below to simply draw a...
Bonsais? Shoetrees? Errantries? Common sickle pines?
Any recommended books or tutorials that might best help me understand Java ME? I've just finished a beginners' book for Java SE and I want to ultimately write programs for mobile devices.
The...
Well, thank you. I sure will. This forum needs folks like you.
As for the reason you and I were sent to this penal colony: The road back to a man's true self is his return from spiritual exile...
I can't thank you enough, Zaphod_b!
Until your in-depth response, everywhere else I looked on the web there was no hint of any explanation for why my example had a "throws Exception" in the...
Yes, which is why I turned to the forum for help. I searched the forum, too.
The program, as it is shown above, compiles and runs as it should. So is the "rest of the code" in the imported classes?
Which is where?
Before I ask my question I need to say that the following code in question is not my own. It is from Oracle's Java Tutorial. This mini-program finds a web page and prints its source code.
My...
I've got it now! (he says with an echo to an empty auditorium)
Just as Zaphod_b said (above), the creation of the array was NOT an illegal instantiation of an object in the abstract class Employee...
Yes, that helps, Zaphod_b. Thank you. This book, although impressive in general, has been known to be ambiguous from time to time. Here again they have dangled a participle or two and let me wander...
Here's a quote from the textbook in question. It might shed some light on my problem.
"Adding an abstract modifier to a class heading makes it impossible to instantiate an object from that class....
First up is the code from the driver creating an array from the abstract parent class. Below that is the abstract parent class' heading and constructor.
public class Payroll
{
public...
Please help me clarify an unclear point in my textbook.
The text says an object cannot be constructed from an abstract parent. But seemingly contradicting this, the example program shows an...
curmudgeon,
Thanks for a great explanation!
I've read the documentation. It's still unclear. I've searched this forum. No luck. So would someone kindly explain in simple terms why the asterisk ("zero or any occurrences") is necessary - as...