Create a java gui app implement inside a main method

Assignment Help JAVA Programming
Reference no: EM13945310

GUI worksheet

1. Create a Java GUI app, implement the following criteria inside a main method 1) set up a visible frame with width 500, height 300; 2) frame title is "CSE205 Frame app"; and 3) setDefaultCloseOperation to EXIT_ON_CLOSE.

2. Continue working on previous question, create a button and a textfield (size:20) on to the same frame. What do you see?

3. Per previous question, create a panel object to organize the button and textfield in it. (create a JPanel object, add JButton and JTextField objects to the panel, add the JPanel object to the frame)

4. create 4 swing components (1 label, 1 textfield(size:15), 1 button and 1 textarea(10 rows and 30 columns)); when the button is clicked, the textarea will display the content of textfield.

public class MyFrame extends JFrame{
private JLabel myLabel;
private JButton myButton;
private JTextField myTextField;
private JTextArea myTextArea;
public MyFrame(){

public class MyGUIViewer {
public static void main(String args) {
JFrame myFrame = new MyFrame();
myFrame.setDefaultCloseOperation(myFrame
.EXIT_ON_CLOSE );

}
public JButton createPrintButton(String text){

myFrame.setSize(400,300);
myFrame.setVisible(true);
}
}

}
}

5. change the textarea to non-editable and background color as green.

6. Per assignment5, parseStringToProduct(String lineToParse) method will process lineToParse argument to split a big long string with certain pattern.

7. Please use proper formats to print out 2 digits after decimal point. What's the outcome when you print number1 with currency format?
double number1 = 3.1056;

Reference no: EM13945310

Questions Cloud

Discuss the 7-s model in relation to a company : Discuss the 7-S model in relation to a company of your choice. The company can be from anywhere in the world. In your answer you will need to discuss the seven steps to success and how organisations achieve success in today's market place
In an agreement to exchange dollars for euros : In an agreement to exchange dollars for euros in 3 months at a price of $.090 per euro, the price is the: Mutual funds which allow shares to be redeemed at any time at a price that is tied to the asset value of the fund are known as: Investment banks..
Give your answers correct to one decimal place : Consider the following. (Give your answers correct to one decimal place.)
Calculate the molar concentration of the solution : A 0.250 L aqueous solution contains 50.0 g of ethanol, C2H5OH. Calculate the molar concentration of the solution in mol·L-1.
Create a java gui app implement inside a main method : Create a Java GUI app, implement the following criteria inside a main method 1) set up a visible frame with width 500, height 300; 2) frame title is "CSE205 Frame app"; and 3) setDefaultCloseOperation to EXIT_ON_CLOSE.
Identify the erroneous bit in the given message : One simple technique combines row-based(character) parity with column-based (longitudinal) parity to help detect and correct single-bit errors.
Problem for a classmate to solve that can be translated : Write a problem for a classmate to solve that can be translated to a system of two (2) or more equations in a least two (2) variables. Explain your answer.
Attractiveness of a potential market : Q1) Discuss how the sociocultural environment will affect the attractiveness of a potential market
Key components of the affordable care act : Identify and describe 10 key components of the Affordable Care Act. It may help to think about the following: Type of individuals that will be seeking coverage and The benefits and draw backs of the ACA

Reviews

Write a Review

JAVA Programming Questions & Answers

  Find the greatest common divisor between two inputed integer

I have to write an interactive program that will find the Greatest common divisor between two inputted integers.

  Derive the class extendedroman from the class roman

For part 'a' the source code for class Roman is attached to this assignment. You do not have to include the method decimalToRoman as you modify this class. Also, class Roman is not used in your test program.

  Print the lyrics for ninety nine bottles of beer on the wall

Write a program that outputs the lyrics for "Ninety Nine Bottles of Beer on the Wall". Your program should print the number of bottles in English, not as a number.

  Client class to test implementation of the vector class

Write a client class to test your implementation of the Vector3D class thatyou implemented. Name the package in which this class is defined (projectname) vector3dapp.

  Bullpart 1 several types of point of interests poi such as

bullpart 1 several types of point of interests poi such as - 1 petrol station 2 taxi stand 3 atm 4 hospital and 5

  Calculates the cost of a mortgage

Write a class called Mortgage that calculates the cost of a mortgage. Prompt the user to enter the principal amount, the term in years, and the interest rate per year.

  Object-oriented gui drawing editor

A simple object-oriented GUI drawing editor that allows a user to create, move and erase rectangles, squares, circles and lines in an interactive graphics. How can I draw move erase rectangles, squares, circles and lines in GUI/java.

  Cse-241 advance programming conceptspoint of sale

cse-241 advance programming conceptspoint of sale terminalin this assignment you will be tested on the concepts related

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  Determine the example of a javascriptr framework in the

what is an example of a javascriptr framework? in the framework you have described what is an example of an application

  Create a program called date java to perform

Create a program called Date.java to perform error-checking on the initial values, for instance: fields month, day, and year. Also, provide a method nextDay() to increment the day by one. The Date object should always remain in a consistent state.

  Write a program cmsc401 java

Write a program cmsc401.java that receives a sequence of commands (from 1 up to 10000 commands)

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