how to create a gui using extended java script?
JavaScript is not suitable to create a gui. In order to make a user interface combined with JavaScript you need at least HTML as a markup language. I don't know what exactly you are looking for right now but it seems that you did not quite get, what JavaScript is for.
You should take a basic look at HTML, CSS and JavaScript so that you have a basic understanding to what they can do.
PS: JavaScript != Java, don't mix it up (I assume you do according to your tags)
First of all, like Ham stated, Java and Javascript are two totally different things. But, what is actually possible is
1.) Write your GUI in Java 2.) Compile the GUI to HTML/CSS/Javascript
There are several frameworks out there capable of this
GWT is one example
There are quite a few options out there, including Yahoo! Widgets and XUL