Hi!
First of all, you may want to take advantage of the ["code"]-tag (without the quotes) when submitting code in the forum. It will look like this:
CODE
...
// Your class here.
...
Remember to close the tags properly by using the ["/code"]-tag at the end of your code-section This has the benefit of greatly improving readability

Now, to your program!
There are a two questions that need to be resolved in order to help you with this:
QUOTE
... it is a javax.swing.*; package all i want is to transfer it into java.util.*; that have a scanner ...
1. Do you mean that you want help with using the Scanner to recieve input from the keyboard, or do you wish to remove all dependencies on the javax.swing package (i.e. making a command-line application) or something completely different that I haven't thought of?
2. Secondly, what is your program supposed to do? As it is right now, all it does is to print "hello" in morse-code a few times and then quits (i.e. do you intend for it to do so?). If I try to make any changes to your program without knowing what it's supposed to do, I will surely fail.
Please answer my queries here, and we'll see what we can do to fix your program.