Question

lort answers, 2 points each in no more than one sentence per question Ta. How does a JavaFX GridPane differ from a BorderPane
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1a. How does a JavaFX GridPane differs from a BorderPane?

Answer: In a GridPane, elements are added in row-column fashion, just like a tabular form, whereas in BorderPane, elements are added in CENTER,TOP, BOTTOM, LEFT or RIGHT of the window.

1b. A JavaFX application must contain a class that extends Application class

1c. What is the file extension for a file that contains this kind of code.

.grid{

                -fx-font-color:#FF000;

}

Answer: css (cascading style sheet, just like in HTML)

1d. One way to use JavaFX is to write all code in Java. The other way involves designing the GUI using FXML (which is an XML based markup language used to design the JavaFX GUI)

1e.In order to implement the EventHandler interface, a JavaFX event handler must have a method called handle(T event) (where T is the type of Event (ex: MouseEvent))

2. Why abstract classes have that name?

Answer:

The word abstract means an existing thought or an idea that does not have a physical or concrete existence. An abstract system is the one that cannot exist themselves, but live through other systems that use this idea. Consider the term – shape. A shape is a geometric figure such as a square, circle or triangle, which provides an outline for the existence of such things. When we think of a square, or a triangle, or a circle, all of these things have something in common – a particular height and width (or even thickness if the object is 3 dimensional), a color, a coordinate where these figures exist, an area or perimeter which is occupied by these figures, etc. All of these common features are used to create an abstract system called Shape. So that it can be generalized under one category. In terms of programming, an abstract class act as an existing set of common variables and methods, which cannot be used to create objects (i.e can’t be instantiated), but can be used to create child classes that inherit the properties of the parent class. Considering the above example, Shape can be an abstract class with properties – a coordinate where the shape exist, a height value, a width value, total area occupied by the shape, total perimeter occupied by the shape, color of the shape, and so on. Child classes can be Square, that has equal width and height, a Rectangle that has different width and heights, a Circle that has a radius, which is the half of the width or height of that shape, a Pentagon that has 5 sides and an angle between each sides etc.

Let me know if you have any doubts. If you are satisfied with the solution, please rate the answer. Thanks

Add a comment
Know the answer?
Add Answer to:
lort answers, 2 points each in no more than one sentence per question Ta. How does a JavaFX GridPane differ from a BorderPane? b. A JavaFX application must contain a class that extends 1o. What i...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT