Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. In the following program, the text field displays the text typed into it, but when we press the button submit, nothing happens. You

  image

. In the following program, the text field displays the text typed into it, but when we press the button submit, nothing happens. You should change the given program such that when you enter a text in the text field and press enter, that text is printed out to screen as shown below: Problems Console ** testExample [Java Application] C:\Users\kkadiyala\.p2\pool\plugins\org.ecli The text you entered is: Great job! Text Action Great job! Submit import java.awt.*; import javax.swing.*; public class test Example extends JFrame { JTextField textField1; JButton mybutton; public testExample() { setSize(300, 100); setTitle("Text Action"); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout()); textField1 = new JTextField(10); mybutton = new JButton("Submit"); add(textField1); add(mybutton); } setVisible(true); public static void main(String args[]) { new testExample(); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Accounting and Reporting a Global Perspective

Authors: Michel Lebas, Herve Stolowy, Yuan Ding

4th edition

978-1408066621, 1408066629, 1408076861, 978-1408076866

More Books

Students also viewed these Programming questions