From time-to-time, I have posted various bits of advice on Java coding.
Some of the more general ones I've collected here.
- How to start writing a Java program
- A working interactive program with notes on how to adapt it to be your own application.
- User Interface Tricks
- Various tools and techniques for user interface programming. Especially highlighting the use of HTMLEditorKit to create flexible, discursive user interfaces.
- Scaling Pages and Images
- For a photo tagging application I wanted to relate a real world map to an on-screen map. This note describes how to convert co-ordinates between the two.
- Exception Handling in PDFBox
- The developers of PDF Box were debating how to handle exceptions. In this note, my bottom line was to suggest reduced reliance on exceptions.
- Displaying a List of Colors
- How best to display color alternatives in two-dimensions? Try your luck.
Demo Programs
To run the demo of these various programs,
download Examples & Sources
and double click it. (You must have Java installed.)
The installer will unwrap itself into its current directory.
Therein double click the "JavaNotes.jar" icon.
It will display a menu of the various demo programs.
src |
Jdoc |
class |
Essay |
note |
|
|
ComboBoxRenderer.java |
|
Demonstration of how to write a Combobox with arbitrary contents; in this case color swatched |
|
|
ZBScrollPane.java |
|
How to control the distance scrolled by the mouse wheel and the arrows at the ends of a scrollbar |
|
|
JEditStyles.java |
|
How to define styles and use them in a JEditPane |
|
|
SamplePanel.java |
|
Rudimentary graphics program suitable for expansion into an app. |
|
|
MakeColorPage.java |
|
Generates a page displaying the named colors. |
|
|
PCASortColors.java |
Provides several methods to sort color tables. |
|