Draw a rough picture of the window produced by this code public class Main extends Application...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Draw a rough picture of the window produced by this code public class Main extends Application { @Override public void start (Stage primaryStage) { HBox data= new HBox(10); Label name LBL = new Label("Name: "); TextField nameTXT = new TextField(); Button addBTN = new Button("Add"); data.getChildren().addAll(name LBL, nameTXT, addBTN); GridPane grid = new GridPane(); Label LBL1= new Label("One"); Label LBL2= new Label("Two"); Label LBL3= new Label("Three"); Label LBL4= new Label("Four"); Label LBL5= new Label("Five"); Label LBL6 = new Label("Six"); grid.add(LBL1, 0, 0); grid.add(LBL2, 1, 0); grid.add (LBL3, 2, 0); grid.add(LBL4, 3, 0); grid.add(LBL5, 4, 0); grid.add(LBL6, 0, 1, 5, 1); BorderPane root = new BorderPane(); root.setBottom (new Label("JAVA FX LAYOUT")); root.setCenter (grid); root.setTop (data); Scene scene = new Scene (root, 400, 200); primaryStage.setScene (scene); primaryStage.setTitle("Testing FX"); primaryStage.show(); } public static void main(String[] args) { Launch (args); } Draw a rough picture of the window produced by this code public class Main extends Application { @Override public void start (Stage primaryStage) { HBox data= new HBox(10); Label name LBL = new Label("Name: "); TextField nameTXT = new TextField(); Button addBTN = new Button("Add"); data.getChildren().addAll(name LBL, nameTXT, addBTN); GridPane grid = new GridPane(); Label LBL1= new Label("One"); Label LBL2= new Label("Two"); Label LBL3= new Label("Three"); Label LBL4= new Label("Four"); Label LBL5= new Label("Five"); Label LBL6 = new Label("Six"); grid.add(LBL1, 0, 0); grid.add(LBL2, 1, 0); grid.add (LBL3, 2, 0); grid.add(LBL4, 3, 0); grid.add(LBL5, 4, 0); grid.add(LBL6, 0, 1, 5, 1); BorderPane root = new BorderPane(); root.setBottom (new Label("JAVA FX LAYOUT")); root.setCenter (grid); root.setTop (data); Scene scene = new Scene (root, 400, 200); primaryStage.setScene (scene); primaryStage.setTitle("Testing FX"); primaryStage.show(); } public static void main(String[] args) { Launch (args); }
Expert Answer:
Answer rating: 100% (QA)
JAVA FX LAYOUT Name TextField Add Button One Two Three Fou... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
For n ¥ 1, let tn count the number of spanning trees for the fan on n + 1 vertices. The fan for n = 4 is shown in Fig. 12.53. (a) Show that tn+1 = tn + nl=0 tl, where n ¥ 1 and t0 = 1. (b)...
-
An expectant mother is looking for the best hospital possible in which to have her baby. She looks at a ranking of hospitals based on the total number of births delivered without complications. Being...
-
A marketing research firm would like to display the relationship between a familys weekly food costs and the number of family members living in the household. The following table shows the monthly...
-
Suppose you are a money manager of a $5 million investment fund. The fund is invested in four funds with the following investments and betas: Stock A B Shares 100,000 100,000 75,000 20,000 C D Price...
-
What BIA components would you recommend as critical for the organization? Based on Spotlight #3, what BIA components would you recommend as critical for the organization? Assume you are assisting...
-
According to the American Time Use Survey, the typical American spends 154.8 minutes (2.58 hours) per day watching television. Do Internet users spend less time each day watching television? A survey...
-
Visit www.pearsonglobaleditions.com/malhotra to read the video case and view the accompanying video. Marriott: Marketing Research Leads to Expanded Offerings highlights Marriotts success in using...
-
On July 1, 2014, McVay Corporation issued $15 million of 10-year bonds with an 8% stated interest rate. The bonds pay interest semiannually on June 30 and December 31 of each year. The market rate of...
-
What is the return on an Investment that costs $500 today and will return $800 at the end of 4 years? What long will it take a $100 investment to double to $200 if the interest rate is 6%?
-
You are employed by McDowell and Partners, Chartered Accountants (M&P). A new client, Community Finance Corporation (CFC), approached M&P for assistance. Enviro Ltd. (Enviro) has asked CFC for a loan...
-
An annealed copper sample experiences a true strain of 0.07 caused by a true stress of 164 MPa. If this is in the plastic deformation region and the strain-hardening exponent is 0.44, what is the...
-
Choose a company that you admire. Use the sources suggested in the Strategy in Practice feature about stakeholder relationships and analyze its performance with 2 to 3 of its stakeholder groups. What...
-
A \(0.20-\mathrm{kg}\) turntable of radius \(0.20 \mathrm{~m}\) spins about a vertical axis through its center. A constant rotational acceleration causes the turntable to accelerate from 0 to 28...
-
An ice figure skater starts out spinning at 0.85 revolution per second with her arms outstretched, as shown in Figure P12.41. She wears lightly weighted bracelets to enhance the spin-up effect when...
-
A recent study by the Kaiser Family Foundation looked at the role of media (for example, television, books, computers) in the lives of children. The report, which is on the Kaiser Family Foundation...
-
Look in The Wall Street Journal, Businessweek, or other business publication and find a company looking to expand through diversification either greenfield entry or acquisition. What type of...
-
choose any organization and evaluate .3 it's mission; by listing the components that are not included in the mission (hi 4)
-
For the following exercises, find the inverse of the function and graph both the function and its inverse. f(x) = 4 x 2 , x 0
-
Write a program that displays a moving text, as shown in Figure 15.33a and b. The text moves from left to right circularly. When it disappears in the right, it reappears from the left. The text...
-
Create a new concrete class that implements MyMap using open addressing with quadratic probing. For simplicity, use f(key) = key % size as the hash function, where size is the hash-table size....
-
A prime number is called a Mersenne prime if it can be written in the form 2 p - 1 for some positive integer p. Write a program that finds all Mersenne primes with p ? 100 and displays the output as...
-
Identical positively charged objects \(A, B\), and \(C\) are launched with the same initial speed from the same position above a negatively charged sheet that produces a uniform electric field. The...
-
A proton, a deuteron (a hydrogen nucleus containing one proton and one neutron), and an alpha particle (a helium nucleus consisting of two protons and two neutrons) initially at rest are all...
-
What orientation of an electric dipole in a uniform electric field has the greatest electric potential energy? What orientation has the least? (Let the system comprise both the electric dipole and...
Study smarter with the SolutionInn App