Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Henry Addo

+ Follow
since Feb 26, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Henry Addo

i realised where the problem was lying. i found out that when the button is clicked to call the "pickNumber" function, a new instance of the array to be passed to the "pickNumber" function is created so the element that i remove from the vector does goes away but a new but the same element are added to vector. To solve this, i created a new function that accepts a vector, then a randomly element is remove from that vector. in the actionPerform method i set a counter, when the counter is zero it should call the pickNumber other wise it should call the second function i created which accepts the vector created in the pickNumber funtion. To really explain the english, here is the code

This is not smart enough for me if you think there is a better way of doing this please advice

[ July 28, 2006: Message edited by: Henry Addo ]

[ July 28, 2006: Message edited by: Henry Addo ]
[ July 28, 2006: Message edited by: Henry Addo ]
15 years ago
no is not an assignment. Random number generation was what came to mind the first time i thought about how to solve it. I will be trying all what has been said and will post code when i'm stack. Thanks
15 years ago
i'm stuck in a situation, i want to pick 10 random elements at a time from a vector.what i have done so far is, i generate a random number uses the generated random number as the index of the element be picked the element from the vector. Now my problem i don't want to pick the element which has already been picked and i know it does that because the indexes being generated repeats due to the random number i'm generating. To get view what i'm really talking about i'm posting a code. Please how do i avoid element already selected. Thanks

[ July 28, 2006: Message edited by: Henry Addo ]
15 years ago
Ok thank i think i should the standard JTabPane than to create
a new one.But going to google to see if i can get what i want
16 years ago

I have multiple applets and i want to load then one after the other.
I want it in such a way that when the first loaded applet is load,
when the user click on the ok button it loads a different applet.
Please how can i implement this.
16 years ago
You can set a counter so that when the Star Search is clicked the counter
is increased by say one then when the New Search is clicked the counter
is reset. Hope that it solves
16 years ago
Please is there a way that i can space tabs of JTabbedPane.
There is this application that i'm writing and i want to
spaces between the tabs. Any idea of how i can implement
that. This is really giving me trouble. Thanks
16 years ago
Why don't you get the item selected
from the first combo box then make a
condition so that when an item is selected
from the first combo box what is suppose to
be displayed in second combo box is displayed.
Hope it works
17 years ago
I have set the jar files to class path but
i still get the same error.
Want i did was, copied the com and org directory
into the into a directory that i created named bins
then set the path to the bins directory in the
mysql-connect3.1.8 directory. The way i set the path
and i still get the same error.What i'm i doing
[ April 27, 2005: Message edited by: Henry Addo ]
when i load the drive i get error.This is what i have done.
I unzip the into /usr/local/share.
then copied all the jar files in the lib directory of my-connect-java-3.1.8
directory to ext directory of the sun-j2sdk1.5.0. I'm on a linux box.
Then i loaded the driver in my code but when i try to add values to my table which i have created already, l get error and is because the driver is not loaded. This is what i have done.

when i run the code i get these errors
Connection error
No suitable driver
I got know to how to load the driver from the documentation.Please what have i done wrong.Once again thank, i preciate every bit of help you are giving me.

[ April 22, 2005: Message edited by: Henry Addo ]
[ April 22, 2005: Message edited by: Henry Addo ]
I will try that i just want to get the
text of the JCheck box i will try your code
17 years ago
I have seen the link to the online documentation thanks
i will read it then figure out how to use it.but i will let
you know when i i'm stuck. I normally don't reply to the post
quiet early because i don't have constant internet connections.
please bear with me.thanks once again i'm grateful
The JCheckBox class has a method,
paramString() that return a protected string
and i want to make a use of that method paramString
and this what i did,
i declared a protected string and equated it to the method,
when a compile a get and error, the method has a protected access.
Please help me on how i should go about it. Thanks in advance.
17 years ago
I java jdbc driver for mysql please
how do i use it to connect to mysql
server. I mean i how do i install it
so i can load the class. I'm newbie
in jdbc so please help me. Thanks