In this activity you will use some of the built-in graphical objects provided by JavaFX to build a familiar user interface graphical component. You will see how the grouping feature allows you to collect simple graphical objects together so they act like a single object. You will also see a specific example of where the common profile and the desktop profile differ. Remember, the common profile features exist on all JavaFX devices, including mobile devices, while the desktop profile provides some capabilities that are only available on more powerful desktop systems. If you are trying to create an application specifically for mobile devices, or you want your application to run on any platform, including mobile devices, you need to restrict your code to using only the common profile. If you are building a desktop application (including applications that may run in a desktop system's web browser), you can use the desktop profile.
In this activity, you will:
- create a common User Interface object by combining several of the built-in graphical objects provided by JavaFX
Skills you will learn include:
- building familiarity with the built-in graphics capabilities provided by JavaFX, which can be combined to build personalized, custom graphical objects
- Open NetBeans, and create a new project. Under the File menu, select New Project, and go through the new project wizard, creating a JavaFX project. Remember, if you need help, use the forum! Once you have created the project, you can make it the Main Project to make it easier to perform your edit/build/run cycle.
- Now go to Lesson 4: Creating Graphical Objects in the JavaFX GUI Applcation tutorial. Go through the tasks of this lesson.
- Submit your project that you created to the activity. You will submit a jar file (a java archive file) that contains your runnable program. To find the jar file, open your project in NetBeans, and note that in the project pane, there are 3 tabs: Projects, Files, Services. Select the Files tab. Expand your project folder by clicking on the '+' sign. You should see a folder called 'dist'. Expand the dist folder, you will probably see a few files and maybe some folders. One of the filenames should end in .jar. This is the file that you will submit. Open the context menu on that file (on Windows, right-click on the file; on Mac, Ctrl-click on it), and select 'properties' from the menu. One of the properties will be the full path to where the jar file lives on your system. Use your file browser to go get the file, and submit it.