Java Example Code
Written by Sean R. Owens (sean at guild dot net). Share and enjoy. http://darksleep.com/player
For other fine writings on Java and other subjects, check out notablog at http://darksleep.com/notablog
You will find here a selection of simple, clear examples of how to
do various things in Java. I don't claim to be an expert in Java,
I'm just trying to provide some simple examples. Take it as you
will.
These examples assumes basic familiarity with Java,
especially with how to compile and run programs.
If you need help compiling and running these, don't ask me. Go
somewhere else.
Java Swing Menu and Button actions
A straightforward example of implementing button 'Actions' -
i.e. what happens when you click a Swing button. This also
applies to Swing menus.
Java and unsigned int, unsigned short, unsigned byte, unsigned long, etc. (Or rather, the lack thereof)
An explanation of how to deal with Java's lack of unsigned integer types.
Java Swing dialogs
An explanation of how to use a Java Swing JDialog.
Java Swing JTabbedPane
A straightforward example using the Swing JTabbedPane.
Java Sockets Examples
A series of simple examples of using Sockets in Java.
Simple Chat One
The first in a series of examples of more complex uses of sockets
in Java. In this example, we show how to create a (very) simple
chat server.
Port Forwarder
A simple application to forward socket connections from one
IP/port to another. This was a quick hack for a friend to allow
them to inspect what was going on in some http transactions. It
is provided here for whatever use you may make of it.
sean at guild dot net
Last modified: Thu Sep 6 20:13:55 EDT 2007