Menu

Ngl 2 Write Graphic User Interface Shown Four Buttons Text Field Text Field Display Corres Q43808546

ngl. 2. Write a Graphic User Interface (as shown below) with four buttons and a text field. The text field will display correngl. 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 Show transcribed image text 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

Expert Answer


Answer to ngl. 2. Write a Graphic User Interface (as shown below) with four buttons and a text field. The text field will display …

OR