Write a java application to display the given gui

Assignment Help JAVA Programming
Reference no: EM131591870

- 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:

- The size of the calculator is 250 x 250 pixels.
- 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.
- The buttons should have at least 5 pixels of space between them.
- The text on the buttons should be SanSerif size 16 and be bold.
- 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.
- 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!");

- Write a Java application to display the following GUI. At this point you are only implementing the display.

This program has the following requirements:

- The textfield should accommodate 3 characters.
- 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!
- The buttons should have 10 pixels horizontal spacing and 5 pixels vertical spacing.
- For the layout of the JFrame, use FlowLayout( FlowLayout.CENTER, 10, 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.
- Do not use inheritance for this program. Use a JFrame member variable as the main window object for this program.

Reference no: EM131591870

Questions Cloud

Prepare aamodt entries to record the returns : Aamodt Music sold CDs to retailers and recorded sales revenue of $700,000. During 2014, retailers returned CDs to Aamodt and were granted credit of $78,000.
Information between consumers and firms or organizations : For each element, explain the flow of information between consumers and firms or organizations.
Recognize the many leadership theories : Leaders don't always know about, understand, or recognize the many leadership theories that are in operation each day within organizations.
Prepare jansen entry when the cash is received : Jansen Corporation shipped $20,000 of merchandise on consignment to Gooch Company. Jansen paid freight costs of $2,000. Gooch Company paid $500.
Write a java application to display the given gui : Write a Java application to display the given GUI. At this point you are only implementing the display - se a JFrame member variable as the main window
How much income telephone sellers should recognize : Telephone Sellers Inc. sells prepaid telephone cards to customers. Telephone Sellers then pays the telecommunications company, TeleExpress.
Why companies will make a product in-house : Give four reasons why companies will make a product in-house and why they will outsource.
When does the ash projectile return to the ground : When does the ash projectile reach the its maximum height? t=? What is its maximum height? When does the ash projectile return to the ground?
Why is it hard to determine relationships boundaries : As a supervisory is it important to build relationships with your workers. What are the appropriate boundaries. Is it hard to determine these boundaries

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that reads in a text file and then computes

Write a program that reads in a text file and then computes and prints a table of letter frequencies. For example, if the file is the text of "A Tale of Two Cities", found in the file at data/tales.txt , the program will print

  Write a java program to simulate a die

Write a Java program to simulate a die. A die has values of either 1, 2, 3, 4, 5 or 6 on the face. You should use the Math.Random() or the java.util.Random() class to generate the values on the die.

  Prepare worlddataapp project it implements the nameindex

prepare worlddataapp project. it implements the nameindex portion includingbull creating it implemented as a binary

  Determines and displays the smallest and largest

Create a method that determines and displays the smallest and largest of the ten values. Then, pass the array to the method - Create a GUI application whose button's Click() method accepts ten integer values from a TextBox and stores them in an arra..

  Write a program that creates two string arrays

Write a program that creates two String arrays, one to store names of 5 boys and another to store names of 5 girls

  Create links using jquery mobile data attribute

Create links using jQuery Mobile data attribute, create a practice page that contains at least 3 links - be linked to another section of the application

  Execute the internal loop of the method

The parameter shall determine how many times to execute the internal loop of the method. Within the loop the method

  Write a code fragment that would printout the multiplication

Write a code fragment that would printout the multiplication table for the number 3 multiplied by (1-10) .

  Write a java program to demonstrate the singleton pattern

Write a Java program (non-GUI i.e only Java class) to demonstrate the Singleton pattern.The key parts of the singleton pattern are:A private static variable to store the single instance called the singleton.A public static method for callers to get a..

  Design the interface classes drawable rotatable and sounds

Design the interface classes Drawable, Rotatable, Resizable and Sounds. Compare and contrast abstract classes and interfaces. In what situations would you use an abstract class? in what situations would you use an interface?

  Create an array of n random instances

Write a method that will create an array of N random instances of this class, where N is an integer parameter to this method and provide a toString method that will format an instance of this class nicely

  Implement a class icecreamcone

Implement a class IceCreamCone with methods getSurfaceArea() and getVolumn(). In the constructor, supply the height and radius of the cone. Be careful when looking up the formula for the surface area

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd