Direct Play Sample
This sample is located in \Samples\DirectX\Dplay.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
Description
This sample, DirectPlay Chat for Java, shows how to use the Microsoft® DirectX® for Java DirectPlay object to implement a simple chat applet.
You must have a full installation of DirectX to use this sample.
Using the Sample
To use the sample
- To start a chat session, select your service provider and click Next. You may be prompted for connection information, depending on the service provider you choose. A list of available sessions will then appear.
- Select a session to display its members.
- You can now either select Join to connect to a selected session or Create to establish a new session. If you are joining an existing session, make sure you are using the same service provider to communicate.
- Now provide your name and click Next to enter the session. Your connection will then be announced to everybody already in the session and you can join the conversation.
- If you are creating a session, you must provide a name for the session in addition to your own name. Click Next and wait for someone to join the conversation.
Key Project Files
dpchat.java
This code creates the main panel that controls connection setups and dialog box displays.
DpChatApplet.java
This class is an applet that wraps the DPChat panel.
PlayDlg.java
This class creates the dialog box that handles the play options.
SendBox.java
This class creates the text area that sends user input to a client applet at the other end of the connection.
SessDlg.java
This class creates the dialog box that displays session information.
SpDlg.java
This class creates the service provider dialogs.
Dpchatj.cab
This signed cabinet file is used by the <APPLET> tags in the HTML page to launch the application in its applet form.
Technologies Demonstrated
DirectX
- This sample exploits some of the DirectX features from Java.
© 1999 Microsoft Corporation. All rights reserved. Terms of use.