Home > Programming, Software > Java: jCTPbundle – Useful Java Functions and Classes bundled

Java: jCTPbundle – Useful Java Functions and Classes bundled

I decided to bundle some of my (hopefully useful) Java Functions and Classes.
Available in the current Version of the so-called jCTPbundle are the following Packages:

  • file – File and Settings-File Functions
  • image – Image and Icon Functions
  • text – Text(stream) Functions
  • gui – GUI Functions, Dialogs, Message Boxes, Text Windows, About Windows etc.
  • screen – Screen Functions
  • audio – Audio Functions, e.g. Sound-Output and Text to Speech
  • math – E.g. Functions to generate random Numbers (int/double) in between Intervalls
  • time – Functions about Time and Space
  • mac – Mac OS X specific Options
  • helper – Some different Functions

I’ve also created an extra Package for Examples:

  • examples – Some Examples how to use the Bundle
  • resources – Resources for the Examples

Here a small Example: “Display a Filechoser to select a File to remove and remove the Selection subsequently. Display an Information Dialog if the Delection succeeded or not.”:

// import file.FileFunctions;
// import gui.Dialog;

// A Dialog to display if Deletion succeeded or not
Dialog dial = new Dialog();

// Use File Functions to select a File
FileFunctions fileFunc = new FileFunctions();
String file = fileFunc.getFileDialog("");
if((file != null) && fileFunc.removeFile(file)) {
	dial.displayInformationMessage("File " +
			fileFunc.getFileName(file) +
			" successfully removed.", "Success");
} else {
	dial.displayErrorMessage("Something went wrong...", "Error");
}

In the Future I will extend and update it.
You can download the jCTPbundle or have a look at the github-Repository.

  1. Arsento
    November 14, 2009 at 2:34 pm | #1

    Hmm… I read blogs on a similar topic, but i never visited your blog. I added it to favorites and i’ll be your constant reader.

  2. Ventego
    November 17, 2009 at 8:41 am | #2

    Valuable thoughts and advices. I read your topic with great interest.

  1. No trackbacks yet.