Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 13 Dec 2011 19:33:45 -0600 Date: Tue, 13 Dec 2011 17:33:44 -0800 From: Patricia Shanahan User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Newsgroups: comp.lang.java.help Subject: Re: Generating a random number on a ball References: <18f0d020-b1ab-42fe-aaca-94d193a393f2@y6g2000yqe.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 19 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.194.31 X-Trace: sv3-hEst2cAp1Rpl4hElWiEH+gq0h6t9muZ3A9BVrvmyP1FUryDjOwtpjvYppYTB0ZYtdQkxP4eoruDgCgz!L6IqROddKBQYKuYusnlAQLQAW5wsD4YNaevd9uIW7e95v9P+ipe7RtBlg+HvulCHT9hAVcjqvWh8!hxibYzX5GFVTi9XiNST0a1A2AJMZygDxoMTrFTkG1p4Crg== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1926 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:1448 Joerg Meier wrote: > On Mon, 28 Nov 2011 10:02:01 -0800, Roedy Green wrote: > >> I don't see your random number code. See >> http://mindprod.com/jgloss/pseudorandom.html >> for how to generate the numbers Getting the number on the ball in 2D >> is a matter of knowing where the ball is and doing a drawString. > > I looked at that and randomly saw: > > "Donąt use two different generators with a null seed." > > Do you mean "0" seed, or no seed ? Because the Random constructor will not > take null. No seed. The problem is that the default seed may not have changed, so the two generators may be returning the same sequence of numbers. Patricia