Applications

How can you build a simple (extensible) spreadsheet class?


http://java.sun.com/applets/applets/SpreadSheet/example1.html.

How can you build a simple (extensible) text editor?


(Submitted by Nelson Yu)
Here is a sample Text Editor called "Notes":

http://ugweb.cs.ualberta.ca/~nelson/java/source/Notes.java

It is your basic bread-and-butter stand-alone text editor. It uses or has the following items:

  1. Menus and a Menubar
  2. Frame
  3. FileDialog
  4. TextArea
(There is a FileDialog bug under Win95 with JDK-Beta 1)

1,2 can be used in an applet by creating a Frame dynamically and then creating the menus. FileDialog is of little or no use to an applet as the applet can notwrite to the client's directories without first downloading a special .class file(and having the user manually install it) and the user modifiy his own ACL(access control list) for the applet.

You will be able to read and write to files via opening a URL and reading a file on the server with a URLConnection and FileInputStream


How can you create a simple query form?


(Submitted by Vivek Pabby)
Below is working code for a class that includes most of the GUI components that you may want to use in a simple form. If you take the code and compile it, it should create a class which can be executed using "java". It also includes a method to handle the user events in cases of button clicks (bonus!!).

The code is Beta compatible and is for an application (as opposed to an applet). But there should be no problem with running as an applet from Netscape. (Please get rid of the System.exit() command when running as an applet.) [Note: The author cautions that there may be extraneous features in the code.]

Select to see sample code


How can you create an order-processing transaction form?



How do I recognize regular expressions?

"How do I recognize regular expressions? Is a Java version of C "regexp(3)" available? Or of the simpler recognizer from Software Tools, even? Would it be legal just to translate "regexp.h" into Java?"

(Submitted by Stephane Laveau, Jonathan Payne)
Jonathan Payne's regex package

How do I make a moving banner?

With fast-forward, rewind, and stop features?

(Submitted by Vivek Pabby)
Select to view source

Select to view applet


How do I parse a complex ASCII text file?



How do I make an application send email? Receive email?


(Submitted by Harm Verbeek)
To see how to send email, check site http://www.pi.net/~hverbeek/Java.html.

To see how to receive email, check site http://www.pi.net/~hverbeek/Java.html.

(Submitted by Bill Giel)
GUESTBOOK.JAVA contains code that would be useful to someone trying to develop a class for sending E-Mail, since that's how GUESTBOOK works!

http://www.nai.net/~rvdi/home.htm

Souce code at: http://www.nai.net/~rvdi/guestbook.java


How do you implement drag and drop between the file system and an applet?



How do you print to a printer with Java and within an applet?



How can I create an inline (i.e. within browser window) GUI (with Menubar, scrollbar etc) in a java applet?