Urgent i need you to debug or modify my code. I am using java programming the see the code below.Attached pic below is the expected output.
Urgent i need you to debug or modify my code. I am using java programming the see the code below.Attached pic below is the expected output.
import java.awt.GridLayout;
import java.awt.*;
import javax.swing.*;
public class Trial {
public static void main(String[] args) {
JFrame frm = new JFrame ("PASSWORD ENTER");
JLabel lb1Name = new JLabel("USERNAME: ");
JPasswordField value = new JPasswordField();
JLabel lb2Pass = new JLabel ("PASSWORD: ");
JTextField txtName = new JTextField(20);
lb1Name.setFont(new Font("consolas",Font.BOLD,20));
txtName.setFont(new Font("consolas",Font.PLAIN,20));
txtName.setHorizontalAlignment(JTextField.CENTER);
lb2Pass.setFont(new Font("consolas",Font.PLAIN,20));
lb1Name.setBounds(50,100,80,30);
lb2Pass.setBounds(50,150,80,30);
frm.setLayout(new GridLayout(1,2,5,5));
frm.add(lb1Name);
frm.add(txtName);
frm.setSize(500,100);
frm.setVisible(true);
frm.add(lb2Pass);
frm.add(value);
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm.setLocationRelativeTo(null);
}
![b. Create a JAVA program using this output as your reference.
Sample output.
1.
PASSWORD ENTER
USERNAME:
enz
PASSWORD:
$$$$$$$$$
2.
PASSWORD ENTER
USERNAME:
Lorena
PASSWORD:
**](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd8554571-105e-42e1-91bf-b0c962f01b24%2Fbef1829d-f9d7-43a1-a643-5d3d3e40b6c5%2Frdlx1bb_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)