Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

A doubt...

Thread view: 
DEEPA - 03 Nov 2007 07:19 GMT
how can i store an array of URLs in a file and retrieve them whaen i
select a component in my GUI?
Andrew Thompson - 03 Nov 2007 09:14 GMT
>how can i store an array of URLs in a file and retrieve them whaen i
>select a component in my GUI?

Many different ways, including the Java programming language.
<http://java.sun.com/docs/books/tutorial/>

For more specific answers, ask more specific questions,
but note:
1) There are sections of the Java Tutorial covering each
of the aspects of code mentioned above.
2) GIYF
3) This is not a 'help desk'.
4) A better groups for beginners in Java is comp.lang.java.help
5) The word 'I' should be capitalised always, and adding
a single Capital Letter at the start of each sentence, makes
text easier to read.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Andrew Thompson - 03 Nov 2007 09:20 GMT
...
>5) The word ...

Oh, and 'A doubt'* means athiests.  Your subject
line should have been either 'A question' or better,
"Load URLs from file to GUI on click" (or something
similarly descriptive).

* And no, I do not care that 'a doubt' means 'a question'
to 'some cultures'.  This is an international forum conducted
in English, and in this context, 'doubt' means 'not trusting
something, that other people believe'.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Patricia Shanahan - 03 Nov 2007 13:59 GMT
> ..
>> 5) The word ...
[quoted text clipped - 8 lines]
> in English, and in this context, 'doubt' means 'not trusting
> something, that other people believe'.

It is, as you say, an international forum. As such, readers should be
aware that there are many dialects of English, including a really weird
one written and spoken in the USA.

Until I moved to California, I had little idea which of the English
English usages I had learned as my native language were shared with US
English, and which were not.

I don't think it is reasonable to insist on people writing specifically
in US English. Any understandable written dialect of English should be
acceptable. The only good reason I see to question a usage is if you do
not, in fact, understand it.

Patricia
Lew - 03 Nov 2007 15:39 GMT
>> ..
>>> 5) The word ...
[quoted text clipped - 21 lines]
> acceptable. The only good reason I see to question a usage is if you do
> not, in fact, understand it.

I am curious how widespread the use is of "to doubt" to mean something other
than "to mistrust information".  It confuses me every time I see the word used
to mean simply "to have a question".

Are we sure that the latter usage is an English dialect and not a
mistranslation from some other language?

Signature

Lew

John W. Kennedy - 04 Nov 2007 02:14 GMT
> I am curious how widespread the use is of "to doubt" to mean something
> other than "to mistrust information".

In Shakespeare, it often means "fear".

> It confuses me every time I see
> the word used to mean simply "to have a question".

> Are we sure that the latter usage is an English dialect and not a
> mistranslation from some other language?

But "doubt" meaning "a matter to be clarified" is normal in Indian
English. (For multiple historic reasons, English is one of the official
languages of India, is widely spoken by Indians one to another, and is
also employed as a literary language.)

Signature

John W. Kennedy
"Give up vows and dogmas, and fixed things, and you may grow like That.
...you may come to think a blow bad, because it hurts, and not because
it humiliates.  You may come to think murder wrong, because it is
violent, and not because it is unjust."
  -- G. K. Chesterton.  "The Ball and the Cross"

Lew - 04 Nov 2007 02:40 GMT
Lew wrote:
>> I am curious how widespread the use is of "to doubt" to mean
>> something other than "to mistrust information".
[quoted text clipped - 3 lines]
>> Are we sure that the latter usage is an English dialect
>> and not a mistranslation from some other language?

> But "doubt" meaning "a matter to be clarified" is normal in Indian
> English. (For multiple historic reasons, English is one of the official
> languages of India, is widely spoken by Indians one to another, and is
> also employed as a literary language.)

Yes, I have learned this from this thread, and it has broadened my horizons.

For the record, and to ameliorate Roedy's and probably other people's
concerns, I have always been fascinated by language and linguistics, and this
is one of those very interesting things.  I appreciate the education that
resulted from my curiosity.

It is reasonable for speakers of Indian English to be aware that a large
number of English speakers would be thrown by that usage, but that is not any
denigration of their own dialect.  It's similar to the fact that I have no
idea what a billabong is, and I bet lots of English-speaking folk have a
similar ignorance.  It's all in the interest of enhanced communication.

And no, it's not hazing to ask about an unfamiliar idiom.

Signature

Lew

Joshua Cranmer - 03 Nov 2007 15:46 GMT
> It is, as you say, an international forum. As such, readers should be
> aware that there are many dialects of English, [ ... ]
> I don't think it is reasonable to insist on people writing
> specifically in US English. Any understandable written dialect of
> English should be acceptable. [ ... ]

IIRC, from our last discussion on the topic, we concluded that the usage
of a "doubt" meaning a question was limited to the Indian dialect of
English, which is generally not spoken by many of the prominent denizens
of c.l.j.p.

I do agree with you that limiting discussion to US English is
unreasonable. I won't complain--nor likely even notice--if someone uses
some British or similarly-derived mannerisms in his or her writing. If
my memory serves me correctly, we have a few Canadians (e.g., Roedy),
some Australians (e.g., Andrew), a fair number of Americans, and a few
Brits.

My opinion is that the usage of English should be limited to those that
most of the denizens are familiar with--the union of the Australian,
British, Canadian, and American dialects of English.

Signature

Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth

Gordon Beaton - 03 Nov 2007 16:23 GMT
> My opinion is that the usage of English should be limited to those
> that most of the denizens are familiar with--the union of the
> Australian, British, Canadian, and American dialects of English.

That's an arbitrary list at best. My impression is that the indians
posting here probably outnumber the australians and canadians
together, but that's hardly the issue here. Why limit anything? Why
this need to be exclusive? And how do you intend to enfore it anyway?

I'm with Patricia here. If you understand the post, then there's no
need to question the poster's choice of words.

/gordon

--
Lew - 03 Nov 2007 16:42 GMT
> I'm with Patricia here. If you understand the post, then there's no
> need to question the poster's choice of words.

With respect to the (mis)use of the word "doubt" you have an arguable
position.  In the general case I respectfully take issue with your position.

When I look up "doubt" in a dictionary, in this case wiktionary, I see this:
> To lack confidence in; to disbelieve, question, or suspect.
> /He *doubted* that was really what you meant./
(emph. orig.)
<http://en.wiktionary.org/wiki/doubt>

Similar definitions can be found in:
<http://www.m-w.com>
<http://dictionary.cambridge.org/define.asp?key=23434&dict=CALD>
(this one is an international reference)
<http://www.dictionary.co.uk/browse.aspx?word=doubt>

All right, let's see if it's part of Indian English, as was asserted.

> *Anomalous usage*
>     * Use of "doubt" to mean "a follow-up question",
> as in "I have a small doubt about this week's homework" or "Do you have time for a doubt?".
<http://en.wikipedia.org/wiki/Indian_English>

Yep.  It's an anomalous usage in Indian English.  Also so is,
> The verb "repair" in southern India is used as a noun for
> a broken object as in, "The TV became repair."
> The same word is used for saying when the broken object is fixed:
> "The TV is repaired and now it is working properly."

I don't agree that we should accept every anomalous usage, not because of
numbers of speakers but because it's not standard.

I see no harm in occasionally letting our friends from India know that that
particular usage of "doubt" is not Standard English.  I agree that we
shouldn't make a World Court case out of it.

Signature

Lew

Roedy Green - 03 Nov 2007 19:41 GMT
>With respect to the (mis)use of the word "doubt" you have an arguable
>position.  In the general case I respectfully take issue with your position.

The question is were you truly incapacitated from answering the
question, or were you just using this as an excuse to haze a newbie?

There are a million reasons to ask for clarification to help answer a
question. I don't see any reason to get so excited about a
regionalism.

I for example use Canadian spellings quite deliberately, (except for
Java keywords) to advertise my regional status.

I have at times used obscure regionalisms deliberately like "skookum"
or "oif"  to tweak curiosity, or as a way of entertaining, or
providing a little local colour.

I even borrow them. There is an Abundance (my homebrew language)
keyword called "BLACK-STUMP" stolen from the Aussie dialect.

I learned "pear shaped" on a visit to Sommerset.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lew - 03 Nov 2007 20:12 GMT
>> With respect to the (mis)use of the word "doubt" you have an arguable
>> position.  In the general case I respectfully take issue with your position.
>
> The question is were you truly incapacitated from answering the
> question, or were you just using this as an excuse to haze a newbie?

Neither, and that's a leading question.

My disagreement with the general case has nothing to do with regionalisms, but
that certain things do need to be corrected.

And this is not the newbie newsgroup.

I asked a question in curiosity, and yet you come storming in with accusations
of incapacity and hazing.  What's your agenda?

Signature

Lew

Arne Vajhøj - 03 Nov 2007 20:38 GMT
>>> With respect to the (mis)use of the word "doubt" you have an arguable
>>> position.  In the general case I respectfully take issue with your
[quoted text clipped - 12 lines]
> I asked a question in curiosity, and yet you come storming in with
> accusations of incapacity and hazing.  What's your agenda?

I think the point Roedy is trying to make (and which I agree with)
is that this is a Java group not an English language group.

If a question is perfectly understandable there are no need to
comment on spelling/grammatical/capitalization/punctuation errors.

Arne
Roedy Green - 03 Nov 2007 21:23 GMT
>If a question is perfectly understandable there are no need to
>comment on spelling/grammatical/capitalization/punctuation errors.

A way to comment on spelling and grammar without hazing is simply to
correct the quoted text.  It is sufficiently subtle not to be rude.
You could even blame it on your spell checker.

It is just a variant of what I do sometimes when people post in
non-English languages and I post my stab at a translation. You are
simple restating a "translation" with added clarity. It is similar to
reposting a code snippet with indentation and proper variable names.
You don't have to bash OP for every individual difference.

On my website when I want to point out what an ignorant boor my
correspondent is, I put the word [sic] after every error.

This has a practical purpose of suppressing me correcting the error
inadvertently. But here I am TRYING to insult.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Andrew Thompson - 04 Nov 2007 00:05 GMT
...
>If a question is perfectly understandable ...

To who?  The person that makes a comment in reply, or
the 5 people who ignored the 'nonsense'*, and immediately
moved on to the next question?

* Nonsense in the sense "I do not understand".

My replies are intended for the benefit of the OP
getting answers from the *other* 5 people. If not this
time, at least perhaps next time they ask.

And as far as use of colloquialisms go.  I use them
myself, but sparingly, and usually only when I am in
'direct conversation'** with someone I 'guess' will understand.

** Some might consider that no thread on usenet is 'direct
conversation' since it is publicly browsable.  Tough - if
anybody *else* is reading and that interested, they can
ask, I will explain.

To the OP..
My advice to avoid meandering side-tracks like this one,
*as well as to help communicate the message,* is to avoid
'local usages' wherever practical.  Feel free to ignore my
advice, if you wish.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Arne Vajhøj - 04 Nov 2007 00:44 GMT
>> If a question is perfectly understandable ...
>
[quoted text clipped - 3 lines]
>
> * Nonsense in the sense "I do not understand".

I doubt the people that are not capable of reading a text because "I"
is not capitalized or similar will be able to contribute with much.

Arne
Andrew Thompson - 04 Nov 2007 02:00 GMT
>>> If a question is perfectly understandable ...
>>
[quoted text clipped - 3 lines]
>
>I doubt the people that are not capable ..

The issue goes beyond whether they are *capable*
of reading the message.

Perhaps you have never seen a post that was such
'rubbish' that made you think 'could not be bothered
wading through it - next'.  

I have.  I often let them slide off into the obscurity
they usually do (which by the way, I find *indicative*
of other people's attitudes, as well).

So, specifically, are you saying you have never
encountered a post that you did not even finish
reading, on the basis you could not be bothered
trying to 'read through' what the OP was trying to
communicate?

>..of reading a text because "I"
>is not capitalized or similar will be able to contribute with much.

The point is whether they contribute at all.

<'rhetorical'>
Why do all these people who criticize my offer of
help, as it exists, not see that?  
</'rhetorical'>

I am more likely to stop making such comments, when
I commonly see 'nice'** replies to these people, that completely
ignore all mistakes they make, correctly 'guess' what
they actually mean (where necessary..) etc.  

If a thread has a few replies, I will pass it by.  Any
extra comment about 'how to get help' would be
redundant.

* Only in the sense that  no one person is qualified
to answer for 'them' - personal perspectives are welcome.

** Using the definition of 'nice' my critics seem to be using,
rather than my own.  I see nothing 'nasty' about giving tips
on correct use of the language in which one is trying
to communicate a technical problem.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Arne Vajhøj - 04 Nov 2007 02:12 GMT
> Perhaps you have never seen a post that was such
> 'rubbish' that made you think 'could not be bothered
> wading through it - next'.  

Sure.

Which is completely irrelevant here.

I specifically said:

"If a question is perfectly understandable"

and has given the example of "I" not being capitalized.

Arne
Arne Vajhøj - 04 Nov 2007 02:19 GMT
>> Perhaps you have never seen a post that was such 'rubbish' that made
>> you think 'could not be bothered wading through it - next'.  
[quoted text clipped - 8 lines]
>
> and has given the example of "I" not being capitalized.

My point is that you have to distinguish.

If the original post is unreadable (50% chance it is
english, 30% french and 20% polish), then it makes sense
to ask the poster to try explain in understandable english.

But if it is small things that does not prevent people
from understanding it, which happen all the time for
people for whom english is not their first language,
then it is both rude to the poster and noise to the
rest of the readers to post correcting this and that.

Arne
Lew - 04 Nov 2007 02:40 GMT
> But if it is small things that does not prevent people
> from understanding it, which happen all the time for
> people for whom english is not their first language,
> then it is both rude to the poster and noise to the
> rest of the readers to post correcting this and that.

Proper nouns and the pronoun "I" should be spelled correctly.  So should
standard API class names, keywords, and the like.  This supports a habit of
mental precision that is necessary and useful for a programmer to possess.

Signature

Lew

Arne Vajhøj - 04 Nov 2007 03:04 GMT
>> But if it is small things that does not prevent people
>> from understanding it, which happen all the time for
[quoted text clipped - 6 lines]
> of mental precision that is necessary and useful for a programmer to
> possess.

I don't think so.

Human languages and programming languages are a bit different. Human
languages are much more complex than programming languages. And most
humans are more forgiving of mistakes than compilers are. It is two
different things.

I don't believe that programmers which show up in a suit every day
a work use better coding style either.

Or that programmers with garages that are not stuffed with
tons of useless stuff always refactor well.

Arne
Gordon Beaton - 04 Nov 2007 08:29 GMT
><'rhetorical'>
> Why do all these people who criticize my offer of
> help, as it exists, not see that?
></'rhetorical'>

I suggest you rent "Dogville" if you haven't already seen it. The
villagers too thought they were being helpful.

/gordon

--
Andrew Thompson - 04 Nov 2007 09:04 GMT
>><'rhetorical'>
>> Why do all these people who criticize my offer of
>> help, as it exists, not see that?
>></'rhetorical'>
>
>I suggest you rent "Dogville" if you haven't already seen it.

I played 'the dog'.  ..

>..The
>villagers too thought they were being helpful.

..and a pity for Grace she did not understand
'mongrel' - I was barking all the time..
"These people are morons, these people are morons,
they feed me, but these people are morons.."

( No.  I haven't seen it, but I have Wikipedia. )

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Andrew Thompson - 04 Nov 2007 02:11 GMT
>>> If a question is perfectly understandable ...
>>
[quoted text clipped - 4 lines]
>I doubt the people that are not capable of reading a text because "I"
>is not capitalized or similar will be able to contribute with much.

I missed some of the finer implications in your
requoting my *own* comment '..do not understand'.

That was perhaps an oversimplified and eroneous
comment on my part.  Maybe it should have been
"..do not understand, or could not be bothered
continuing reading".

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Roedy Green - 03 Nov 2007 20:53 GMT
>I asked a question in curiosity, and yet you come storming in with accusations
>of incapacity and hazing.  What's your agenda?

I viciously attack anyone I believe is hazing newbies. You have seen
me rip strips off Andrew, the main offender, many times.

Java can't succeed without new people learning it. We should do
everything possible to encourage newbies to persevere.

I hate bullies.  And hazing newbies over trivia is a form of bullying.
It is perfectly ok to give them unsolicited information, but not to
berate them for not already knowing it.

When I first started programming Java, people were extremely rude and
discouraging. I could have left and looked for a more friendly
programming community, but I persevered because I was impressed with
Java's technical merits.

Learning a new language is difficult enough without putting up with
emotional hurdles.

If you were an employee you would not treat fellow employees or
customers that way, playing little power trip games. Treat them the
way you would have liked to be treated when you were a newbie.

If you want to blast a newbie, torment those lazy bums who want you to
do their homework without them doing any work or learning anything.
I won't interfere.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lew - 03 Nov 2007 21:14 GMT
> If you were an employee you would not treat fellow employees or
> customers that way, playing little power trip games. Treat them the
> way you would have liked to be treated when you were a newbie.

Sure I would treat fellow employes the way I did here, which was to ask about
an idiom about which I wanted more information.  It is a strange, and somewhat
jarring, idiom to me, to which I admitted.  I got that information, and in the
process found some sources on the web that enhanced my knowledge.

You seem to want to characterize that as a "little power trip game".  That's
your opinion, and you're entitled to it, but I don't see it.  If indeed I
offended anyone, that was not my intent.

> If you want to blast a newbie, torment those lazy bums who want you to
> do their homework without them doing any work or learning anything.
> I won't interfere.

Nobody's doing any blasting here but you.

Signature

Lew

Daniel Dyer - 03 Nov 2007 21:55 GMT
>> I asked a question in curiosity, and yet you come storming in with  
>> accusations
>> of incapacity and hazing.  What's your agenda?
>
> I viciously attack anyone I believe is hazing newbies.

On the subject of regional English language differences, I've never come  
across the term "hazing" until this thread (had to look it up - the OED  
lists it as a North American term).  The use of the word "doubt" (an  
uncertainty) to mean a question was much less confusing in comparison.

Dan.

Signature

Daniel Dyer
https://watchmaker.dev.java.net - Evolutionary Computation for Java

Andrew Thompson - 04 Nov 2007 02:14 GMT
...
>I viciously attack anyone I believe is hazing newbies.

(shrugs)  You also 'vicously'* attack people who use the
term 'wanna'.  

* If likening someone to a paedophile, could be regarded
as vicious.  Your call.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Andrew Thompson - 04 Nov 2007 02:29 GMT
>...
>>I viciously attack anyone I believe is hazing newbies.
>
>(shrugs)  You also 'vicously'* ...

..and given that had quotes and an asterisk, and was
spelt correctly on the immediate previous line, it would
also have been good if I had got the spelling correct.
Oh well.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Roedy Green - 03 Nov 2007 16:33 GMT
On Sat, 03 Nov 2007 14:46:05 GMT, Joshua Cranmer
<Pidgeot18@verizon.invalid> wrote, quoted or indirectly quoted someone
who said :

>My opinion is that the usage of English should be limited to those that
>most of the denizens are familiar with--the union of the Australian,
>British, Canadian, and American dialects of English.

The main way people even discover that a familiar phrase is not
universally understood is to use it and have people query it.

Since an increasing percentage of the new Java programmers are from
India, I think it prudent of all of us to learn some of the
regionalisms from that part of the world. Personally I get great
delight discovering colourful new vocabulary.

I would draw the line at using things like text speak where people are
not even speaking the standard English of their region.  There is no
need to DELIBERATELY obfuscate.

I have not seen people decry the use of various regionalisms from
England.  I suspect an unconscious racism is at play.

When I was in India, people would talk to me.  Sometimes I could not
tell if they were speaking English or some other language.  When I
expressed my lack of understanding, they would of course speak louder.
This was not a problem of English as a second language, but more as
English modified as in Jamaica.  I am surprised the written form is as
intelligible to us as it is.  Please let us cut these newbies some
slack.

This is an international newsgroup.  We should not be giving some
nations privileged status.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Andrew Thompson - 04 Nov 2007 02:21 GMT
...

'different folks - different strokes'

>I would draw the line at using things like text speak where people are
>not even speaking the standard English of their region.  There is no
>need to DELIBERATELY obfuscate.

Some might agrue the text speak and l33t speak are
more standard than 'English', since many people that
use either, may grasp text/l33t better than English itself..**

>I have not seen people decry the use of various regionalisms from
>England.  I suspect an unconscious racism is at play.

..but maybe that is merely a kind of ..'technologism'*.

* That sounds vaguely rude..  ;-)

** But I do not look forward to either being used for
messages on usenet.  We have good bandwidth and
full keyboards, and there are already enough arconyms
and 'standard abbreviations' we must deal with, when
programming.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Joshua Cranmer - 04 Nov 2007 19:41 GMT
> On Sat, 03 Nov 2007 14:46:05 GMT, Joshua Cranmer
> <Pidgeot18@verizon.invalid> wrote, quoted or indirectly quoted someone
[quoted text clipped - 11 lines]
> regionalisms from that part of the world. Personally I get great
> delight discovering colourful new vocabulary.

A better way, I suppose, to say what I did is that I should mean the
intersection and not the union, the English that is the true lingua
franca of the Internet and not the regional dialects thereof. I would
like to think that I have excised my regionalisms from my posts, but
given how embedded they are, I am sure that some of my words must seem
as foreign to Indians as the usage of `doubt' to mean `question' did to
many of us.

> I would draw the line at using things like text speak where people are
> not even speaking the standard English of their region.  There is no
> need to DELIBERATELY obfuscate.

I would draw the line slightly higher: I frown upon the use of
expletives and extreme slang terms, although not as much as text or l33t
speak.

> I have not seen people decry the use of various regionalisms from
> England.  I suspect an unconscious racism is at play.

As I said before, I tend to disagree with the use of regionalisms in
general, although I am more used to the British regionalism than to,
say, the Indian ones, so I might not notice them as much.

> This is an international newsgroup.  We should not be giving some
> nations privileged status.

My intent had not been to do this, but my words were probably too
ambiguous (or more likely, a case of me not thinking through things
enough before posting). However, since it is the (unfortunate) case that
most people expect English to be used, text should probably be in as
proper English as possible to facilitate those who use automatic
translators (and those who do use them should probably indicate the fact
so that others do not chastise them when the translators are imprecise).

Signature

Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth

Patricia Shanahan - 04 Nov 2007 20:29 GMT
...
> A better way, I suppose, to say what I did is that I should mean the
> intersection and not the union, the English that is the true lingua
[quoted text clipped - 3 lines]
> as foreign to Indians as the usage of `doubt' to mean `question' did to
> many of us.
...

Intersection does not work, because the incompatibilities between the
dialects would leave us with no way to express a lot of things.

The most obvious example is the quality associated with frequency of
light waves, with values such as "red", and "blue". There is no correct
way to spell it in the intersection. Allowing the union seems much more
practical. Then I can choose between "colour" and "color", both of which
will be understood by most readers of any dialect of English.

What should I call the element with chemical symbol "Al", atomic number
13? Neither "aluminium" nor "aluminum" is in the intersection.

How about the leather bag with a shoulder strap in which I carry my
wallet, keys etc.? In US English it is a "purse", in English English it
is a "handbag", but what should I call it in the intersection?

Patricia
Are Nybakk - 03 Nov 2007 10:57 GMT
> how can i store an array of URLs in a file and retrieve them whaen i
> select a component in my GUI?

This was an awfully unclear and general question. It's sort of like
asking how to program in java. Should I assume you know how to use
arrays and read files? Is your problem that you want something done on a
GUI event? What does "select a component" mean? Before we can help you,
you need to explain what you want.
Roedy Green - 03 Nov 2007 16:34 GMT
>how can i store an array of URLs in a file and retrieve them whaen i
>select a component in my GUI?

store the files one URL per line in a text file.  Use UTF-8 encoding.
see http://mindprod.com/applet/fileio.html
to generate you the code to read write.  Choose buffered.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

lyallex - 04 Nov 2007 11:36 GMT
> how can i store an array of URLs in a file and retrieve them whaen i
> select a component in my GUI?

It always amazes me the amount of time people on this list devote to
arguing about something that has nothing to do with Java.

The OP wants to store an array of URLs (not Strings or any other object
AFAICS) so what's wrong with (illustration only)

File repository = new File("...");
   
public void writeURLs(URL[] urls) throws Exception { //for brevity

   ObjectOutputStream urlout =
      new ObjectOutputStream(
         new FileOutputStream(repository)
      );

   urlout.writeObject(urls);       
}
   
public URL[] readURLs() throws Exception { // for brevity

   URL[] urls = null;
   ObjectInputStream urlin =
      new ObjectInputStream(
         new FileInputStream(repository)
   );

   urls = (URL[])urlin.readObject();

   return urls;
}

Or am I missing something.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.