aspose file tools*
The moose likes Beginning Java and the fly likes Javascript / Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Javascript / Java" Watch "Javascript / Java" New topic
Author

Javascript / Java

Terry Stehle
Greenhorn

Joined: Mar 24, 2001
Posts: 24
Im new to java but have been programming in C++. Im currently working on a chess program for the web. Its a big task, but I like a challenge. Anyways the problems im having is choosing the create form for the program. I want the program to run outside of the browser. So that the players can minimize the browser, and still play the game. I would assume that this would need to be an application. So I have been trying to create an application in java 2. But how do I get the web page to open the application for them? Or do I need to use javascript to accomplish this? Or do I need to create the whole program in javascript? Whats the differents in java and javascript? If I need to create the program in javascript, does anyone now of any good sites like this one, or any books that may be of interest. I would appriciate any help on this topic. Thanks Terry
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
If you want to make the game available on a web page, you can not have it be an application. That breaks all the security stuff that caused applets and servlets to be designed the way they are to begin with. You could make an application AVAILABLE on a web page and have the user download it (voluntarily) and then start it up outside the browser (by double clicking some bat file or something).

"JavaRanch, where the deer and the Certified play" - David O'Meara
Terry Stehle
Greenhorn

Joined: Mar 24, 2001
Posts: 24
Im still confused. I'm a frequent chess player of MSN Gaming zone. The lobby, and the game rooms work independent of the browser. Meaning that I can minimize my browser, and still see the room. There is some kind of download involved. But I do not half to run any exe files to play. This is what Im trying to achieve. The zone is located at www.zone.com. Anyways I thank you for all your advice. Thanks Terry.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Use Javascript to open a new browser window, removing all the toolbars, and then load your applet in this new window. Is that more like it? I'm pretty sure that's what MSN would do, and your initial download is some sort of ActiveX control. I had to do the same thing to play Bejewelled and Alchemy, although these games do not appear in a new window.
[This message has been edited by Mike Curwen (edited April 01, 2001).]
Zkr Ryz
Ranch Hand

Joined: Jan 04, 2001
Posts: 187
On the msn game zone, Im almost sure they have use Active X, because I`ve tryed to play chess on a Apple G4 once and the site told me something like , "If you are not running Windows, you are not welcome".
A very, very good chess game on the internet is definitely Yahoo chess Yahoo games!!, I have played it on Mac OS 9, solaris, and Windows 9x, and runs very well on the three of them, it holds 3500 user playing at the same time, and it was made with java applets , its really outstanding

If you wanna make a chess program in java, I suggest you to take a look in this site.

Regards Zkr


Terry Stehle
Greenhorn

Joined: Mar 24, 2001
Posts: 24
I have played at yahoo before. The lobby is a java applet. But the game requires you to download yahoo chess. When you create a table the program will launch. This window allows you to minimize the browser, and still see the game board. This is what Im trying to do. Question is, is the table (The game) created using a java applet, or is it an application created with java. Does anyone know how I can make it so when the users of my site click on a button that it will launch my application written in java. Or launch an java applet in a different window seperate from the browser. So that they can minimize the browser when they are playing my game. Even if they had to download the first time I wouldnt mind. I understand that there are many restrictions for java, but Im trying to create a game site and would perfer them to be able to play without the use of the browser. Anyways thanks for all the comments. I would appricate anymore suggestions. Thanks Terry Stehle
[This message has been edited by Terry Stehle (edited April 02, 2001).]
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Terry,
All you have to do is launch a Frame from your Applet. This will open up a seperate window. This is not another browser window, this is just like a Java application window, except it will say something across the top like "Applet window" that you cannot change for security reasons. You would then just add everything to the Frame instead of the Applet.
HTH,
-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Terry Stehle
Greenhorn

Joined: Mar 24, 2001
Posts: 24
Thanks for you reply Nate. I think it will help me alot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript / Java