Hi Friends, David and Javad
First of All thank you very much for your help and it is appriciated.
Finally, I gave up calling the keyboard Panel to the dialogbox. I came up with new idea to make the keyboard in a new Frame and let the user call it when ever they want.
Finallay I manage to do so with your helps. thanks for that.
Although I have tried all the above suggestions, It did not work. I don't know why, although I have done this many times before. it might be some small issues. anyway for last time I have tried Davids suggestion. which is shown in the following code.
and preferedSize was set to keyBoard as well. but it did not work
finally I could get the keyPanel where I wanted the keyBoard to be displayed, but not the keyboard. then decided to leave it and try an alternative which works
I will post the solution here for people who struggles with.
Again Thanks for both of you.