top of page

A New Dimension of GUI's

Mar 15, 2018
2 min read

As a two week project, we were tasked with creating a stock and shares program.

This was my inspiration for making my application, and help my design the look and layout of my program.

Normally when creating a program that has a GUI, I used java swing, but for this task, we were encouraged to use javaFX to achieve some of the features such as the graphs.

I do prefer the look and feel of JavaFX over Java Swing. FX, looks more modern and there is more room for designing a customising the look of your program.

Task:

Create a stocks and shares program that prints a list of shares for selected companies. After a certain amount of time, the share price can increase and decrease.

  • Including:

  • A printed list of the share prices

  • A graph that correlates with the increasing and decreasing prices

Struggle:

The main struggle I had with this program was learning how javaFX works and how to use a third-party application to actually design the GUI. As well as starting to use css files and seeing the affect they had on the GUI.

Because I built the program with one main scene ( this is the name for each of the different screens) and then several smaller scenes that housed the graphs for the relevant company, which are integrated within the main scene. My initial hope was to be able to pass values and variables between the scenes. However , I found that a lot harder than I thought it would be and therefore I opted for the longer and therefore less efficient was of producing my final program.

The fact that I wasn't able to pass variables, did hinder a few of the ideas that I had hoped to integrate. However, I was still able to add some of those features, albeit a longer way.

Final Outcome:

Overall, I am very pleased with how my projects turned out, considering it was my first attempt at using javaFX.

My program plots pre-generated numbers against the graph every few seconds, this represents a 24-hr period. I was able to get this to do it for each of the 5 companies that I had used. I does however reset the drawing of the graph every time the company button is clicked, but this is something that can be solved once I figured out how to pass variables.

Hopefully through doing more projects and the more I use and learn javaFX, I will be able to possibly come back and update this to include some of the missing features.

  • This is the opening screen
  • Timed Graphing
  • Part of the Graph
  • A full 24hr Graph


 
 
 

Comments


Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Black LinkedIn Icon
  • Black Google+ Icon
bottom of page