How can change Button Label value Every Time when i start Virtual Keyboard,
Means ,if 1st time Button1=''a'' then next login time Button1 = " any Alphabet "...
....is this Possible through Probability Distribution & Counter...?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
How can change Button Label value Every Time when i start Virtual Keyboard,
Means ,if 1st time Button1=''a'' then next login time Button1 = " any Alphabet "...
....is this Possible through Probability Distribution & Counter...?
I don't really know exactly what a "virtual keyboard" is and, less so, a "probability distribution and counter". But maybe this helps...
It is possible to construct a List instance (an ArrayList, LinkedList, WhateverList) and fill it with 'a' to 'z'. That is put 26 chars into the list. Now you could also have a List of buttons so that the behaviour of button each button is linked to a specific element in the list of char values. Now the Collections class has a nice method shuffle() which can be used to shuffle the list of char values.
So, for instance, the 3rd button will get its "value" from the 3rd element of the char list. When you click this button it might print 'c' to System.out. Then when the shuffle() method is called with the char list as an argument, the button behaviour will change and it will print some other random char value.
.
......Thnxxx.....someone give me same solution....i'try.