Author: saqibkhan

  •  Drawing an Ellipse

    An Ellipse is defined by two points, each called a focus. If any point on the Ellipse is taken, the sum of the distances to the focus points is constant. The size of the Ellipse is determined by the sum of these two distances. The sum of these distances is equal to the length of…

  • Drawing a Circle

    A circle is the locus of all points at a fixed distance (radius of circle) from a fixed point (the centre of circle). In other words, a circle is a line forming a closed loop, every point on which is a fixed distance from a centre point. A circle is defined by two parameters namely…

  • Drawing a Rounded Rectangle

    In geometry, a rounded rectangle is defined as a 2D shape that contains arched edges instead of sharp edges. It is obtained by placing four different circles on a sharp-edged rectangle with its vertices as their centers. The edges of this rounded rectangle are common tangents drawn against these circles as shown in the image below. In…

  • Drawing a Rectangle

    In general, a rectangle is a four-sided polygon that has two pairs of parallel and concurrent sides with all interior angles as right angles. It is described by two parameters namely − Rectangle in JavaFX In JavaFX, a Rectangle is represented by a class named Rectangle. This class belongs to the package javafx.scene.shape. By instantiating this class,…

  • Drawing a Line

    Generally, a line is a geometrical structure which is infinitely long on a multi-dimensional plane (Say, an XY plane). This geometrical figure does not have any start and end points; neither does it have measurable dimensions like width, depth etc. Even though a line is a one-dimensional object, it can still exist in two or higher dimensional…

  • 2D Shapes

    In the previous chapter, we have seen the basic application of JavaFX, where we learnt how to create an empty window and how to draw a line on an XY plane of JavaFX. In addition to the line, we can also draw several other 2D shapes. 2D Shape In general, a 2D shape is a…

  • Application

    As we have already learned, JavaFX is an open source free software platform, that allows a user to develop client applications that work consistently across various devices. Using JavaFX, one can create Graphical User Interface applications (GUIs), and Internet or Desktop applications as well. All these applications will be developed in Java. In this chapter,…

  • Architecture

    JavaFX is a software platform that allows developers to build various content-rich client applications, which operate consistently across several platforms. It is a complete API with a rich set of classes and interfaces to build GUI applications with rich graphics. Some of the important packages of this API are − In this chapter, let us learn…

  • Installation using Visual Studio Code

    Microsoft Visual Studio Code also allows you to create a JavaFX application. You do not need any extra plug-ins or installations to create a non-modular project. Instead we just update the run configurations, like Netbeans and Eclipse IDE. In this chapter, we will install the latest version of Microsoft Visual Studio Code to work with…

  • Installation Using Eclipse

    Eclipse is an integrated development environment (IDE) used in Java programming. It contains a workspace and an extensible plug-in system in order to customize the environment. You can also use JavaFX with Eclipse. This chapter explains the steps to create a JavaFX application in Eclipse IDE. We will be using the latest versions of both…