Institute of Computer Science
  1. Courses
  2. 2017/18 spring
  3. Object-Oriented Programming (Narva College) (P2NC.01.083)
ET
Log in

Object-Oriented Programming (Narva College) 2017/18 spring

  • Home
  • Materials
  • Java Glossary
  • Source Example
  • Cheat sheet (S1-S6)
  • Grading
  • Links
Session 7

Introduction

JavaFX is a framework for developing Java GUI (graphical user interface) programs. This session material serves two purposes. First, it presents the basics of JavaFX programming. Second, it uses JavaFX to demonstrate object-oriented programming and design.

Historically, there have been many possibilities for creating graphical user interfaces in Java. When Java was introduced, the GUI classes were bundled into a library known as the Abstract Windows Toolkit (AWT ). AWT is can be used for developing simple graphical user interfaces, but not for developing comprehensive GUI projects. The AWT user-interface components have been replaced with a more robust, versatile, and flexible library known as Swing components. Swing is now replaced by a completely new GUI platform known as JavaFX. It has a large functionality which cannot be covered within one practice session. In this session, we will study a few examples in order to get a taste of JavaFX and guidelines how to use this library on your own.

Before we will proceed with the first JavaFX program, make a few preliminary steps. First check if the JavaFX plugin is enabled in IntelliJ (File -> Settings -> Plugins). Then create a project as usually (New -> Project), but on the first page of the wizard, in the left-hand pane, select JavaFX:

In the JavaFX project there are some classes already (Main and Controller) in the package sample. Try to run Main program and we will get the first (empty) graphical window.

Session 7
  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment