Best way to force a JComponent to repaint itself

P

Patricia Shanahan

zerg said:
In the classes themselves, yes. In the JComponent method listing in the
API documentation, there are two. It is the JComponent method listing in
the API documentation that I was consulting, for obvious reasons.
....

The list headed "Method Summary", despite its heading, is *not* a
complete list of methods, only of the ones the class directly declares.
If the class inherits any methods there is a list, immediately after the
"Method Summary", of the methods inherited from each superclass.

Those lists are just as important for finding the method you need as the
"Method Summary".

In the case of JComponent and repaint, there are two overloadings in the
"Method Summary". There are also three appearances in the list of
"Methods inherited from class java.awt.Component", documenting the fact
that JComponent inherits three additional overloadings.

Patricia
 
K

Knute Johnson

zerg said:
That's not what bothers me. It's that they are often remarkably
unsuccessful at SUCCEEDING that bothers me, and in fairly silly ways.
For example, if you know, for sure, the exact answer to the question,
and you don't include it in your response, well, that's just plain silly!


That's for the programmer to decide, not you. I know my code far better
than you do, and I don't see why you need to know jack about it in order
to provide a simple, straight answer for a simple question. If I had a
design-related conundrum I would ask a design-related question. When I
have a "how to do X very specific thing with Y" type of question, and
ask it, I want an equally specific answer, not some kind of inquest
based on some suspicion, based on very little evidence, that there's
some sort of problem with my design. I ask for what I want, but you
reply not with what I want but with your own mixture of suspicions, idle
questions, and sometimes outright insults.

My guess (and now I'm the one speculating about you with limited
information, instead of just giving a straightforward answer -- let's
see how you like it) is that it stems from a widespread belief among the
people here that nobody who asks a question here has the faintest clue
what the hell they're doing, and all need guidance as if from a teacher
or something instead of simple technical-support like responses that
directly answer specific questions.

Maybe many of the people who post here ARE that clueless. But it's
insulting to the rest of us when you treat us as if we ALL are, and it
obstructs just getting to the point as quickly as possible and then
moving on.


JComponent has no no-arg repaint() method save, according to another
post to this thread, one it inherits from java.awt.Component. Of course,
since I was not looking at the AWT docs, only JList and JComponent, and
expecting anything generally useful for Swing components to be in the
latter in particular, I didn't know about it earlier.


Perhaps I didn't make it clear enough in my previous post to this
thread. I have not finished the component and begun testing it yet. When
I do, I will of course observe normal Swing thread-safety procedures and
avoid doing long tasks on the EDT. (I am concerned about the need to
update the ListModel on the EDT though; it may be necessary eventually
to add large numbers of items, perhaps even tens of thousands, all in
one big bolus, which would tie up the EDT. Perhaps adding smaller
batches at a time, letting the EDT get some work done elsewhere, then
adding more, etc.; but then the list control is likely to keep
repainting itself until the job's done. Argh.)

The repaint issue has nothing to do with any observed problem with the
class. It occurred while still coding the first draft of the class, as I
wrote some methods to set some properties specific to my class that will
affect the cell renderer's rendering. Of course, this means that the
list should repaint itself, and at the same time since none of JList's
own setters have been invoked, the repaint won't have been triggered as
a side effect of anything in my setters, and so has to be scheduled
explicitly. (And I STILL don't know if I should revalidate in cases
where the cells may have changed size. Maybe it's time a better guide
specifically for component subclassers got written somewhere.)

(Convinced that I actually, honestly DO know what the heck I'm doing
now? :p)

Call repaint() and come back with a better attitude when it doesn't work.
 
Z

zerg

Daniele said:
PS: I AM NOT INSULTING YOU!

No; indeed, this was a very good response, which explains in detail what
the differences among these are and how, when, and for what, exactly,
they should be used -- which the docs by themselves were a bit skimpy
on. This information would be good for adding to the Java Tutorial in
the section on JComponent.

This is the sort of response I would have preferred from those others.
Thank you.
 
A

Arne Vajhøj

zerg said:
I begin to suspect that there's some sort of unwritten code here that
forbids the giving of a straight answer.

No.

But maybe you will find cljh better than cljp.

Arne
 
Z

zerg

bugbear said:
I strongly suspect the resident experts are actually
trying to prevent short term wrong design decisions,
inferred from your question, turning into long term,
had to fix pain.

Unfortunately, they are inferring wrong.
 
Z

zerg

Peter said:
And what reasons are those?

Because that's what leaps out at you when browsing the documentation
looking for promising method names in the alphabetized list?
Again with the imperatives. I will reply to you in any manner I see fit.

Again with the threats! You will comport yourself in a polite manner or
you will be sorry.
Um, let's see. There's one person in this thread who is cursing,
engaging in name-calling, and just generally getting their panties in a
twist for no good reason.

Yes, there is, and his name is Peter Duniho. Cursing: "RTFM", at least
twice. Name-calling: calling me incompetent, stupid, and several other
things, three or four in total at least. And counting. Panties in a
twist: you are exhibiting signs of being insistent upon having the last
word in an argument. Does that count?
The idea that you've not done anything to deserve ire from someone else
is

quite natural.
It's funny. Looking back at various threads, you seem to accuse people
of hostile and other unsavory behavior to you quite often.

There have been approximately three threads where I have done so, and
every time somebody had been treating me with some level or another of
verbal disrespect, without provocation, beforehand.
And yet, the
people whom you accuse don't seem to be accused of that behavior by
anyone else.

That's not what a Google Groups search says. There have been a couple of
other people that have called people on being rude here over the years.
The sets of people that they've called rude have a fair degree of
overlap, too, particularly tending to include Andreas, Andrew, Arne, and
Lew. Interestingly, your own name has not turned up. Maybe you're fairly
new, too, and picked a poor choice of role models.
You will probably think this is just coincidence, or perhaps some form
of persecution. But the fact is, you seem to have trouble getting along
with others

I don't have any trouble getting along with others so long as those
others treat me with a certain minimum level of respect. In other words,
I don't have any trouble getting along with others unless they have
trouble getting along with me first.
and seem to think that this newsgroup owes you much more
than it really does.

No, I think it owes me only the most basic and obvious things, in
particular that I be treated as a person, not a number, and with a
reasonable level of respect, similar to how you'd treat someone you
talked to on the phone or met face-to-face. In other words, my
expectations have been entirely reasonable, being limited as they have
been to basically "people will remember the manners their mothers taught
them and comport themselves appropriately for public dialogue with
strangers around".

Unfortunately, some people seem to think that politeness rules go out
the window as soon as they hook up a modem to their telephone line. But
it is those people that are in the wrong, not I.
 
Z

zerg

Knute said:
Call repaint() and come back with a better attitude when it doesn't work.

My attitude is fine. It is Peter's attitude that leaves much to be desired.

Are you now contradicting Peter and claiming that repaint() WON'T work?
Because he indicated that it WILL.
 
Z

zerg

Peter said:
It isn't. However, nobody in this thread has done such a thing (at
least, not yet). You have claimed otherwise, but your claim was a lie.
It looks like the API is missing a no-arg "repaint()" [...]

What part about "It looks like the API is missing a no-arg repaint()" is
not a claim that what you were looking for doesn't exist?

It's a claim that what I was looking for doesn't exist IN THAT
ALPHABETIC LIST OF JCOMPONENT METHODS.

It turns out to exist, SOMEWHERE ELSE.

There is no contradiction here.
 
Z

zerg

Peter said:
That you did. Since I haven't posted any attack posts

A lie.

In quoting your post, I have omitted without comment several chunks of
insulting but otherwise content-free nonsense and several threats,
starting with one such threat that had occurred right after the above
quoted material. It was my determination that none of that crap was
worthy of being dignified with a specific response. Suffice it to say
that pretty much none of your judgments of me carry any weight
whatsoever -- what insults of yours weren't mere opinion (and
narrow-minded, ill-informed opinion at that) were instead outright
factually wrong.

(Peter had nothing meaningful and worthwhile to say in response to this.)

(Peter had nothing meaningful and worthwhile to say in response to this.
In particular, he did not address the "no skin off your nose" part of my
previous post, where I established quite clearly that his getting angry
at me for my not looking someplace non-obvious for something was
completely unreasonable on his part. Who died and made Peter the Grand
Arbiter of Where People Must Look, Or Else?)

(Peter had nothing meaningful and worthwhile to say in response to this.
As expected, he merely denied having lied, despite having been caught in
numerous lies recently.)

(Peter had nothing meaningful and worthwhile to say in response to this,
just more opinionated and insulting nastiness.)
My purpose is in sharing information that you and others may find useful

I have surely made it abundantly clear, by now, that I don't find any of
your insulting blather useful. You've said about ten thousand words in
this thread already, of which a grant total of perhaps a dozen were
actually useful, nearly all of them in the one phrase
"http://java.sun.com/javase/6/docs/api/java/awt/Component.html#repaint() ".

(Peter followed up the above bogus "statement of purpose" with another
full paragraph of insulting twaddle that has been largely ignored by me.)
I know why I'm posting. Why are you? What are you contributing?

At this time, I'm posting to get answers to questions, and now also to
try to dispose of these baseless mischaracterizations of me that you
keep posting in public.
I never said the docs were perfect.

Well, now that that's settled, will you PLEASE stop getting on my case
for not finding them 100% perfectly clear on some topics?

(Peter had nothing meaningful and worthwhile to say in response to this.)
It most certainly is.

No, it is not.

I POSTED THE ENTIRE DESCRIPTION TEXT FOR BOTH METHODS HERE, OMITTING
NOTHING, AND THE THING THAT YOU CLAIMED WAS IN ONE OF THEM WAS IN
NEITHER. YOU EVEN ADMITTED THAT IT WAS, INSTEAD, IN THE DOCS FOR A THIRD
METHOD.

STOP YOUR DAMN LYING!

Why do you even bother? Anyone with even as rudimentary a text editor as
Notepad can prove you a liar in this instance:
* Select the description text for the first method, paste in an empty
Notepad window.
* Select the description text for the second method, paste in the same
Notepad window below the first pasting.
* Search in that Notepad window for "repaint".
* Observe that the search finds no results.
* Conclude that you lied when you said that one of those methods'
descriptions said to use repaint instead.

And as for your subsequent weasel-words: You are still a liar and a
charlatan. Get thee hence!

(Peter had nothing meaningful and worthwhile to say in response to this.)
Why not just do it now?

Because if I do it now, you will post another bunch of posts like these,
badmouthing me in public, and people will read them but not see any
reply from me explaining that you are wrong. And then they may think
that you're right, and thus think poorly of me.

Every time you post something hostile about me I will post something
that says that your post is untrue.

I will continue to do so until you get the message and stop trying to
defame me.

I certainly will not allow you to get your wish, that of having the last
word, not now that you have made this personal!

(Immediately after "Why not just do it now?", Peter misquoted me
intentionally and mischaracterized what I wrote, falsely accusing me of
being dishonest.)

(Peter had nothing meaningful and worthwhile to say in response to this.)
No. My implicit claim is that you should have looked there when I
directed you there. You didn't even do that.

(Peter had nothing else meaningful and worthwhile to say here.)

Yes, I did. I continued to argue with you about OTHER THINGS THAN WHICH
REPAINT METHOD TO USE. Namely, on the various irrelevant side topics
like "is Zerg stupid?" that you raised, and where obviously I have a
vested interest in debunking your numerous myths, fables, and outright lies.

(Peter had nothing meaningful and worthwhile to say in response to this.)
It's not an implementation detail at all.

Certainly it is, or it wouldn't be in another package entirely. They
could have written a Swing component class from scratch, since it
doesn't use a native peer. That they didn't do so and inherited from a
pre-existing class for code reuse instead is, of course, an
implementation detail.

(Peter had nothing meaningful and worthwhile to say in response to this.)
Whatever.

Then our argument here is done. You can go ahead and stop posting to
this thread now.
I ... I've ... with respect ... what sort of understanding is needed.

(Peter had nothing else meaningful and worthwhile to say here.)

What sort of understanding is needed IN YOUR OPINION is not germane to
any of this newsgroup's on-charter traffic. If you have an opinion as to
what sort of understanding is needed, fine -- apply it when you yourself
seek to understand some chunk of the API. Do not, however, arrogantly
presume that all and sundry MUST hold the same opinions themselves, "or
else". You don't get to decide that.

How would you like it if I told YOU that YOUR opinion of how much
understanding was needed was no good, and you were a terrible person for
not having the exact same opinion as I did about the matter?

Perhaps I think that "the classics" are an essential part of a
well-rounded education. Does that give me a good reason to publicly
badmouth you in the event that it somehow comes to my attention that you
are not knowledgeable about "the classics"?

Perhaps I think that it is unwise to attempt to fly an aircraft over a
large body of water without a minimum of 15 months' piloting experience.
Does that give me a good reason to publicly badmouth you in the event
that it somehow comes to my attention that you flew a plane over a large
body of water less than three months after beginning training?

I didn't think so.

Well, now that that's settled, can we stop arguing?
Your immediate reply to my answer was:

See above, though I take it you agree that
repaint(getBounds()) is the best method.

It looks like the API is missing a no-arg "repaint()"

No one who had bothered to look at the link I provided would have
written such a thing.

Obviously, someone would -- I did.

Perhaps I should have been more clear before, though. By "the API" I
meant "the methods in the JComponent alphabetic method listing".
What do you care?

That's none of your damn business. It's my right to care or not as I see
fit, and you have no place questioning me on such matters!

Next time you try to peek through any keyhole of mine, you can expect to
get a poke in the eye.
Right, we're back to that. So again, what word would you prefer I use?

How about "didn't live up to Peter's inflated and excessive expectations"?

Not that your personal expectations of other peoples' performance at
activities like research have any legitimate bearing on anything in this
news group.

(Especially when those expectations are apparently rather stringent and
cannot be met at all by anyone that doesn't have oodles of free time to
devote solely to pleasing Peter the freaking Great over here.)
Those "very dense blocks of nothing but links" are very important.

(Peter had nothing else meaningful and worthwhile to say here.)

I didn't claim otherwise. I did note that they are not very readable or
very amenable to skimming or extracting, in a time-efficient manner, any
kind of useful information.

(Peter had nothing meaningful and worthwhile to say in response to this.)
I'm not "blaming" you for anything.

A lie. If you were not blaming me for something, you would not feel
justified in punishing me for something, and if you were not (trying to
be) punishing me for something, you would have behaved respectfully
towards me, since I'd not done you any ill.

You were snappy and nasty to me from the get-go. People only do that if
they feel hostility of some sort -- anger, resentment, whatever --
toward someone. Which they only do if they perceive that someone to have
wronged them in some way. That is to say, they blame them for something.

However, I am not to blame. I am, in fact, never to blame for anything
whatsoever, because I always do due diligence to avoid any action that
reasonably foreseeably will cause harm, and I never act out of outright
malice. And, of course, I cannot reasonably be blamed for anything given
those two things -- anything bad resulting from an action of mine
despite my due diligence is either an accident, with no blame at all to
be assigned, or the result of SOMEONE ELSE'S CHOICE.

In the case of this spot of unpleasantness and all these off-topic
posts, they stem not from my asking a question here in good faith, but
from your responding in bad faith. In other words, the blame here falls
squarely on YOU.
I'm offering advice to you that would help you in the future, if
only you would settle down long enough to listen to it.

That tired old line again. If you were genuinely interested solely in
magnanimously providing advice, then you would simply furnish the advice
in a neutral or friendly manner, remaining civil and polite at all times.

No, you are not trying to dispense advice, you have an ax to grind and
you will not let go of it.

Admitting that is the first step, Peter.

Go on. I dare ya.

(Peter had nothing meaningful and worthwhile to say in response to this.)
You know...I would've just let it go if you hadn't gone off and
commanded me to "shut up about it". But I so enjoy flauting your
authority (such as it is :) ).

So much for "I'm only posting here to provide genuinely helpful
advice!"; you're only posting here to be a prick now, and you've just
admitted it.

Congratulations. Now EVERYONE here can feel free to killfile you, secure
in the knowledge that they won't be missing much by doing so.

(Peter had nothing truly meaningful and worthwhile to say in response to
this, but I'll respond to a few isolated sentences of drivel anyway.)
The fact is, this isn't about your "responsibility" at all.

You are behaving in a hostile manner toward me. You are badmouthing me
in public. You claim to be doing so because I didn't research something
in as much depth as you would have preferred I did.

You have also arrogantly claimed that your opinion on how much depth of
research is desirable is in some way actually universal, or even a
factual truth.

In other words, in your opinion, it is not merely the case that my
research efforts didn't meet your personal standards, but, because in
your opinion your opinions acquire the force of law here, in your
opinion I actually had a DUTY to research to at least that depth and
failed to fulfill it. You have even used almost that exact phrase,
"failed to fulfill it", a couple of times in berating me in this thread!

You have, therefore, implicitly been claiming that I had a
responsibility that I did not live up to.

Heck, just look at the fact that you are (still!) seeking to punish me
for not living up to your exacting standards! Someone who has merely
disagreed with you on a matter of opinion surely would not be deserving
of punishment. Only someone who had actually failed to live up to an
obligation, a responsibility of some sort, would be so deserving. So
your very actions prove that you THINK that I DID shirk some responsibility.

Even though I did not actually do so.
This is about getting answers, using the documentation and technology
as best you can.

No, this is about whether or not zerg is a bad person. The simple fact
that 80+% of the (non-quoted) word count in your posts is devoted to
trying to support your claim that I am one is sufficient evidence that
that is what this is really all about.
There's no one who's keeping track of whether you "met all of your
assigned tasks" or "fulfilled all of your responsibilities".

Sure there is -- there's you, and anyone failing to do so (according to
YOUR OPINION of what their responsibilities should be) gets flamed to a
crispy brown!

Don't think people haven't noticed.
Because that's where the information is.

(Peter had nothing else meaningful and worthwhile to say here.)

That's ludicrous. That's like suggesting that if I am looking for
information on Blargle mating rituals, I should go to
http://some.obscure.site/noone/ever/heard/of/blargles/mating.html
because "that's where the information is" despite a hypothetical Google
search having come up empty. How, exactly, was I expected to come by
that URL? Come on. You have those very exactingly high standards. Surely
you live up to them yourself before publicly berating everyone who you
discover fails to do so. Tell us all how you do it so that we can
actually start to live up to your high and exalted standards! (Just so
long as there's a procedure we can follow that WON'T add six hours or
more to the time spent researching any given situation.)

Oh, but that wouldn't do, now, would it? Because you enjoy berating
people for not living up to your exacting standards, don't you? If
everyone started to actually live up to them, you'd lose your primary
source of entertainment and ego gratification, and that simply would not do!

Get the hell out of this newsgroup; comp.lang.java.programmer is for
adults to discuss Java programming in a civil and polite fashion, not
for you to manipulate and troll for your own personal gratification. As
long as your purposes here are in conflict with the newsgroup's charter,
you should post elsewhere instead and avoid getting in the way of us
adults trying to discuss Java programming.

(Peter had nothing meaningful and worthwhile to say in response to this.)

(Peter had nothing meaningful and worthwhile to say in response to this.)

It is your very actions in this thread that imply it. Don't you see?
 
Z

zerg

(Peter had nothing meaningful and worthwhile to say in response to this.
Rude and condescending, yes, and with erroneous speculation about me to
boot, but meaningful and worthwhile? Not on your life.)
I have been nothing but polite here.

(What a liar!)
I made no threats.

(What a liar! And he proceeds to make another nasty threat right after
this!)

(Peter had nothing meaningful and worthwhile to say in response to this.)
I definitely never called you stupid _or_ incompetent (even if I did
think it).

You are definitely a liar.

(Peter had nothing meaningful and worthwhile to say in response to this.)

(Peter had nothing meaningful and worthwhile to say in response to this.)

(Peter had nothing meaningful and worthwhile to say in response to this.)

(Peter had nothing meaningful and worthwhile to say in response to this.)
I can't speak for the others, but I assure you that I have in every way
treated you exactly as I would when speaking, on the phone or
face-to-face.

(Peter had nothing else meaningful and worthwhile to say here, but he
did take the next traditional step and add false accusations of ill
mental health to his repertoire of insulting lies.)

Then you must get an awful lot of punches in the nose. Heck, you
probably even have a reconstructive surgeon on speed dial. "Dammit,
someone popped me one again and it's crooked again. How soon can you
schedule me so I can have it straightened out again?"

That's what happens, after all, if you routinely go about looking down
your nose at anyone who doesn't live up to your standards of absolute
perfection, and moreover insinuate in front of other people that such
people are idiots, incompetent fools, or whatever.

You need to look deeply into your own motives here, methinks. You
obviously aren't here to help people. Why do you find some people not
worth your while to spend five minutes helping, but nonetheless worth
your while to spend five hours publicly denouncing and berating?

That is not the time prioritization of a helper; it is the time
prioritization of a fault-finder whose primary mission is to find fault
in others and loudly broadcast every occurrence that you find (according
to your own ridiculously stringent standards, too, so you'll probably
have lots of nasty and small-minded opinions to say about anyone, no
matter how saintly).
 
B

Ben Phillips

zerg said:
Congratulations. Now EVERYONE here can feel free to killfile you, secure
in the knowledge that they won't be missing much by doing so.

FWIW, I've just killfiled the both of you. Merry fucking Christmas!
 
Z

zerg

Peter Duniho wrote:

(Peter had nothing truthful to say at all; merely wasted a post calling
me a liar when he's the liar here.)
 
Z

zerg

(Peter had nothing meaningful or worthwhile to say in response to this.
All he did was idly speculate about my mental health in a vacuum of any
actual information or expertise on the topic.)

(Peter had nothing meaningful or worthwhile to say in response to this,
either, just vehement and empty denials of having done what anyone can
see he did just by browsing this thread.)
 
J

Joshua Cranmer

zerg said:
Because that's what leaps out at you when browsing the documentation
looking for promising method names in the alphabetized list?

You're looking for a method to get a JComponent to repaint. I don't know
about you, but I consider repainting to be a core widget action. That
means I will look first at the root of the widget hierarchy, which is
obviously Component (JComponent is only the root of the lightweight
hierarchy). Ergo, JComponent is only a red herring in the method search.

Also, if you examine the basic structure of the AWT and Swing methods,
you will find LARGE numbers of overloads, and especially methods that do
fair amount of method wrapping (i.e. A is really a wrapper around B with
a bit more magic involved). So although JComponent sets stuff up so that
creating new widgets is simple, it does so by only modifying the roots
of these wraps.

Looking for methods only in a leaf class is not going to be complete.
Yes, there is, and his name is Peter Duniho. Cursing: "RTFM", at least
twice.

Actually, some people interpret "RTFM" as "Read The Fine Manual", i.e.,
look at the nuances deep in the text.
The sets of people that they've called rude have a fair degree of
overlap, too, particularly tending to include Andreas, Andrew, Arne, and
Lew.

Account for the fact that Andrew and Lew are in what I would consider
the top tier of posters (the other two being Roedy and Patricia); the
others are in the second tier. For comparison, I would place myself no
higher than the third tier of posters, and even that is a stretch for
me. Those who respond the most tend to be those who get the most mud
flung at them. Posters of... controversy probably get more, though
(think XahLee, Twisted, or JSH).
 
M

Martien Verbruggen

I DID look at the docs -- the JList and JComponent docs. Why would I be
poking around in the AWT docs? I'm obviously using Swing.

In the Java documentation, just after the alphabetical list of methods
under the heading 'Method Summary', there are lists of all methods that
are inherited from each of the superclasses. the no-argument repaint()
is in one of those lists, and the link takes you straight to the
description in the superclass where it's defined. You don't need to
search any other class documentation but the class you're directly
interested in, but you should check all the possible lists of methods in
that documentation.

Regards,
Martien
 
M

Mark Space

Martien said:
In the Java documentation, just after the alphabetical list of methods
under the heading 'Method Summary', there are lists of all methods that
are inherited from each of the superclasses. the no-argument repaint()

Those lists of inherited methods are a pain to read, imo. They're
mostly useful for searching (Control-F in most browsers).

I think it's easier to click on the link at the top to the superclass,
and read the nicely formatted method summary. Then keep clicking and
reading until you hit Object.
 
A

Arne Vajhøj

Mark said:
Those lists of inherited methods are a pain to read, imo. They're
mostly useful for searching (Control-F in most browsers).

I think it's easier to click on the link at the top to the superclass,
and read the nicely formatted method summary. Then keep clicking and
reading until you hit Object.

It is usually not a problem to read everything at the first
page.

But Swing classes do tend to be a bit heavy in methods.

Arne
 
A

Arne Vajhøj

zerg said:
Suspect what you will, but I did indeed examine the JComponent API docs,
and there were three public methods associated with repainting -- not
counting that repaint() had two overloads.

I may have been somewhat biased by what I was specifically searching
for, namely a no-argument method for "repaint the whole component". It
looks like maybe that is simply lacking.

It is in the documentation.

You just need to read it.

Arne
 
A

Arne Vajhøj

zerg said:
That's not what bothers me. It's that they are often remarkably
unsuccessful at SUCCEEDING that bothers me, and in fairly silly ways.
For example, if you know, for sure, the exact answer to the question,
and you don't include it in your response, well, that's just plain silly!

In this group people have some expectations about the posters
of questions.

Those begging to learn Java or learn programming should find
groups better suited for that.
That's for the programmer to decide, not you. I know my code far better
than you do, and I don't see why you need to know jack about it in order
to provide a simple, straight answer for a simple question. If I had a
design-related conundrum I would ask a design-related question. When I
have a "how to do X very specific thing with Y" type of question, and
ask it, I want an equally specific answer, not some kind of inquest
based on some suspicion, based on very little evidence, that there's
some sort of problem with my design. I ask for what I want, but you
reply not with what I want but with your own mixture of suspicions, idle
questions, and sometimes outright insults.

That is a typical mistake among new programmers.

You really don't want to learn how to do something stupid - you
want to know how to do the right thing.

That sometimes require taking a step back and focus on what
instead of how.

This is a forum where you get the best advice whether you want
it or not.

The smart people learn - other don't.
JComponent has no no-arg repaint() method save, according to another
post to this thread, one it inherits from java.awt.Component. Of course,
since I was not looking at the AWT docs, only JList and JComponent, and
expecting anything generally useful for Swing components to be in the
latter in particular, I didn't know about it earlier.

It is on the JComponent document page as well.

There is this thing called a vertical scroll bar out
when you browse the docs. Use it ! Or be really advanced
and use the search function !!
Perhaps I didn't make it clear enough in my previous post to this
thread. I have not finished the component and begun testing it yet. When
I do, I will of course observe normal Swing thread-safety procedures and
avoid doing long tasks on the EDT.

I suggest you do it right the first time.

Arne
 
A

Arne Vajhøj

zerg said:
In an AWT class, apparently, where I of course didn't go looking for it
since I'm working with Swing.

It is is on the doc page for the class you are using also - all you
need to do is scroll.
If you'd prefer not to answer a question, for some particular reason,
you could always not post any kind of response to it at all. One thing I
will certainly not tolerate, however, is any sort of response that
implies, in front of a worldwide audience no less, that you think I'm in
some way incompetent. Stop doing that!

Do you think anyone will stop doing anything just because you say so ????
In a place where I didn't look, and where I had no reason to look, since
it's in a completely different section of the API documentation.

Same page.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top