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

  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

  Write the code and output result1 real cash register can

write the code and output result.1. real cash register can handle both bills and coins. design a single class that

  Project socket programming - udp objectives - learn socket

project socket programming - udp objectives - learn socket programming in java udp-nbsp cement your understanding of

  Create a program that has an array of given length

Create a program that has an array of length 100 which will automatically be filled with randomly generated numbers between 1-100 each time the program is run

  Establish a connection to the mycustomers database

Write a Java program to establish a connection to the MyCustomers database using the JDBC driver to retrieve the entire Customers and Orders table.

  Digital image processing using java

Digital image processing using java ..create plugin using Jedit and run it in imageJ

  Methods are commonly used to break a problem down into

methods are commonly used to break a problem down into small manageable pieces. a large task can be broken down into

  Implement the hierarchy for a university with java classes

Implement the above hierarchy for a university with Java classes and their appropriate relationship. You can go three levels deep in the hierarchy (community member, employee, student, alumnus, faculty, staff). Use your best judgment of instance v..

  Number of space characters in a string

Write a loop that counts the number of space characters in a string - You need to implement a program to find the number of spaces.

  Compute area and perimeter of a polygon

Create a project that would let a user compute area and perimeter of a polygon

  Each instance of this class will represent one book a book

each instance of this class will represent one book. a book consists of the title of the book a string and the authors.

  Display a table of values

Using Netbeans, use repetition to display a table of values showing x, the square of x and the cube of x. X is to go up to 5.

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