Question: ngl. 2. Write a Graphic User Interface (as shown below) with four buttons and a text field. The text field will display corresponding text according

 ngl. 2. Write a Graphic User Interface (as shown below) with

ngl. 2. Write a Graphic User Interface (as shown below) with four buttons and a text field. The text field will display corresponding text according to the button clicked, e.g. Process New", or "Process Open", etc... (10 marks) E FrameAslistenerDemo eO e om commnd-line. The the string, nd display the New Open Save Print Process New //import package swing import java. awt.event.*; import java.awt.*; e three butions Save, Read, and Clear ng the text from play { //inheritance and implement public class FrameAslistenerDemo private JButton jbtNew = new JButton("New"); = new JButton("Open"); = new JButton("Save"); - new JButton("Print"); private JButton jbtopen private JButton jbtSave private JButton jbtPrint //declare and initialize a JTextField component named display public FrameAsListenerDemo() { JPanel panel1 - new JPanel(); JPanel panel2 = new JPanel(); panel1.add(jbtNew); panell.add(jbt0pen); panel1.add(jbtSave); panel1.add(jbtPrint); panel2.add(display); display.. O; //set display to be not editable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!