In the last post we saw how you can easily create a JTree using an array of strings. The JTree however did not display the values in a hierarchy but displayed all the values at the same level. So in this post we will build our Java Desktop Application using JTree with a hierarchy. Continue reading “Using JTree to display a hierarchy”
JTree is a Swing class used display a tree like structure such as the one shown below.
Now unlike some of the more basic swing objects JTree is designed Continue reading “Getting started with JTree Part 1”
The other day I came across an example where a formula written in a Java program could be represented in standard notation on the screen. I thought this was brilliant. I recall back in my Uni days using the formula editor in Microsoft Word to present formulas. Now I don’t have a use for this in Java yet but, you never know. However in case anyone out there does have a requirement to represent a formula written in a programming language in standard notation then maybe this will help. Continue reading “Math Formula in Java”
Traversing the file system is one of the common tasks required in applications. Search the web for examples and you can find plenty of examples of how to go about it. One of the most popular is to work through the file system using recursive calls like this: Continue reading “Traversing the file system”
One of the challenges when writing Desktop applications in Java has always been deployment. The write once run code anywhere concept has always been attractive but it has been the running of the code which has traditionally been the stumbling block.
Over the years there have been many solutions developed to overcome these challenges. Initially there was Continue reading “Java Executables”
What is our code doing?
Now you may be thinking that we have just completed a basic application in the previous section and whilst that is true, that was all about proving our environment works. Now we are going to assume our tools work and take a look at building our application.
As any experienced developer will tell you, when things go wrong with your application, it’s too late to wish you had some information to tell you what is going on; develop a strategy for capturing what your application is doing behind the scenes and implement it throughout your code.
For this application we are going to use a log file to write out what’s going on, more specifically we are going to use Log4J that we downloaded earlier. Continue reading “A basic Application to get started – part 1”
Having tested our code in Eclipse and proved it works there we now need export our code to the file system.
To get our code out of Eclipse we will export the files from Eclipse to our file system. Continue reading “Testing our Environment – part 5”