Reference no: EM13811708
Create Java programs for the following two problems.
1. Write a Java application to display the following GUI. At this point you are only implementing the display. We are not ready to make the calculator actually do any calculations!
This program has the following requirements:
1. The size of the calculator is 250 x 250 pixels.
2. The background and foreground color of the calculator buttons must alternate in a checker board pattern as shown above. You can choose any pair of colors for your foreground and background colors.
3. The buttons should have at least 5 pixels of space between them.
4. The text on the buttons should be SanSerif size 16 and be bold.
5. Your application should be implemented in a single class. The main method of the class does nothing more than create an object of the class. The constructor of the class creates and displays the GUI. The constructor may call other methods of the class if needed.
6. The class must inherit from JFrame as the following demonstrates:
public myGUI extends JFrame { ... }
The extends keyword specifies inheritance. Inside the class you can directly access methods of the JFrame class without specifying an object due to inheritance. So when you want to add something to the frame, simply say
add(someComponent);
You can specify the title of the window in your constructor by simply adding the following line as the first thing in your constructor.
super("Title of your window!");
2. Write a Java application to display the following GUI. At this point you are only implementing the display.
This program has the following requirements:
1. The textfield should accommodate 3 characters.
2. The X and Y labels should be next to the corresponding textfields.
Hint: Put each label and its adjacent text field into a panel, then put both panels into another panel!
3. The buttons should have 10 pixels horizontal spacing and 5 pixels vertical spacing.
4. For the layout of the JFrame, use FlowLayout( FlowLayout.CENTER, 10, 5).
5. Your application should be implemented in a single class. The main method of the class does nothing more than create an object of the class. The constructor of the class creates and displays the GUI. The constructor may call other methods of the class if needed.
6. Do not use inheritance for this program. Use a JFrame member variable as the main window object for this program.
How are the weights derived that are used in the wacc formul
: 1. How are the weights derived that are used in the WACC formula? 2. How does a company's before-tax cost of debt compare with a company's after-tax cost of debt? 3. In the WACC formula, how's a company's after-tax cost of debt determined?
|
Weight of debt-weight of preferred stock-weight of equity
: Discount rate to use to evaluate the purchase of a new warehouse facility. To finance the purchase, GBH will sell 20 year bonds with a $1,000 par value paying 7.5 percent per year (paid semi annually) , at the market price of $955. Preferred stock pa..
|
Southern states in the united states
: Southern states in the United States are, on average, poorer than northern states. Southern states also have higher growth rates in real GDP per capita, on average, than northern states. Use these facts to draw a conclusion about whether the theory o..
|
How learning more about linguistics affected your position
: Do you still agree with any of your own opinions from that response? What has changed if anything? How has learning more about linguistics affected your position?
|
Write a java application to display the following gui
: Write a Java application to display the following GUI. At this point you are only implementing the display. We are not ready to make the calculator actually do any calculations
|
True or false the yield spread between baa rated bonds and a
: TRUE OR FALSE The yield spread between Baa rated bonds and Aaa bonds increased from 89 basis points to 309 basis points between June 2006 and November 2008.
|
Income statement-revenue before fixed costs
: It represents the most recent years operations, which ended yesterday. Your Supervisor in the controller’s office has just handed you a memorandum asking for written responses to the following questions: If sales should increase by 25%, by what perce..
|
What occupations did or do you plan to hold as an adult
: When you were a child, what occupations did or do you plan to hold as an adult? What occupation or occupations did you end up holding/ what type of jobs did you or do you do?
|
Identify significant elements of the constitution
: Identify three significant elements of the Constitution
|