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

  Design the logic and write the rest of the program

Design the logic and write the rest of the program using a nested statement.  They are using JOptionPane.showInputDialog.

  Redesign the grading program as an object-oriented design

Redesign the grading program as an object-oriented design. We will start with a simple Student class. The student will have a name, an id (as a String) and a set of grades (as doubles).

  Create an application for disney''s cottages

Create an application for Disney's Cottages, a weekend getaway resort that rents cottages and boats to use on the local lake

  Questions1 design and implement an applet called circles

questions1. design and implement an applet called circles that draws 50 circles of random diameter in random locations.

  Create a driver class with a main method

Create a driver class with a main method that creates a course, adds several students, prints a roll, and prints the overall course test average

  Programing of tree java

The listing of Tree.java is supplied below as a starting point for this lab. A picture of Tree.java output is also shown. Either cut/paste the code or type it in. Run the program to verify that it works. Study the listing until you understand comp..

  1 comparing portions of strings write an application that

1. comparing portions of strings write an application that uses string method region-matches to compare two strings

  Prepare a program to show the number with no rounding

Prepare a program to show this outcome with no rounding - java program

  Create a virtual directory

Create a Web archive file and attach to this assignment. Do not copy (cut and paste) any example code, create your own code and use the examples as a guide.

  Reads an input record and prints the name

Reads an input record and prints the name if the current total is less than the limit.

  What violations and crimes would you definitely file

What if you were a parole officer and had to decide whether or not to file complaints against your parolees? What violations and crimes would you definitely file complaints for and what would you most likely overlook and why?

  How are they used in javadoc comments

What is a tag and how are they used in Javadoc comments?

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