Please help me fix this program. It is constantly saying I have duplicates of class main and many more Main. Java is below as well as my gui which is the photos (the gui is my problem) import java.util.*; public class Main { //Inputs a one character string and returns True if the character is a letter (i.e. a to z or A to Z). Returns false if it is not. A function to check that the password or encryption key is valid. public static boolean isALetter(char letter){ if( (letter >= 'a' && letter = 'A' && letter =-32767 && encryptKey
Please help me fix this program. It is constantly saying I have duplicates of class main and many more Main. Java is below as well as my gui which is the photos (the gui is my problem) import java.util.*; public class Main { //Inputs a one character string and returns True if the character is a letter (i.e. a to z or A to Z). Returns false if it is not. A function to check that the password or encryption key is valid. public static boolean isALetter(char letter){ if( (letter >= 'a' && letter = 'A' && letter =-32767 && encryptKey
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help me fix this program. It is constantly saying I have duplicates of class main and many more
Main. Java is below as well as my gui which is the photos (the gui is my problem)
import java.util.*;
public class Main
{
//Inputs a one character string and returns True if the character is a letter (i.e. a to z or A to Z). Returns false if it is not. A function to check that the password or encryption key is valid.
public static boolean isALetter(char letter){
if( (letter >= 'a' && letter = 'A' && letter =-32767 && encryptKey
![46
// check which button was clicked
47 if (e.getSource () == btnDe)
48▼ {
49 // declare strings for input and output
50 StringBuilder s = new StringBuilder();
51
52 s.append(phrase In);
53
54 s.reverse();
55 phraseIn = txt In.getText (); // get the input string
56 phraseOut = phraseIn.reverse();
57 txtOut.setText (phraseOut);
58
}
59
else if (e.getSource () == btnClear)
60
{
61
txtIn.setText (""); // clear both strings
txtOut.setText ("");
62
63
64
}
65
}
66
public static void main(String[] args)
67▼
{
68
new Main();
69
70 }
71
}](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe2204a33-61dd-4e15-9ec5-762e318128aa%2Fabc6a5e9-1290-4999-8680-43cf0b988bdd%2Fme49tbj_processed.jpeg&w=3840&q=75)
Transcribed Image Text:46
// check which button was clicked
47 if (e.getSource () == btnDe)
48▼ {
49 // declare strings for input and output
50 StringBuilder s = new StringBuilder();
51
52 s.append(phrase In);
53
54 s.reverse();
55 phraseIn = txt In.getText (); // get the input string
56 phraseOut = phraseIn.reverse();
57 txtOut.setText (phraseOut);
58
}
59
else if (e.getSource () == btnClear)
60
{
61
txtIn.setText (""); // clear both strings
txtOut.setText ("");
62
63
64
}
65
}
66
public static void main(String[] args)
67▼
{
68
new Main();
69
70 }
71
}

Transcribed Image Text:1 import java.awt. *;
2 import javax.swing. *;
3 import java.awt.event. *;
4 import java.io.*;
5 import java.util.*;
6
7▼ class Main extends JFrame implements ActionListener {
8
9
JButton btnClear, btnEn, btnDe;
JTextField txtIn, txtOut;
10
11
JLabel lblEn, lblDe;
12
13 ▼
public Main () {
14
15
super("Super Spy Encryption");
16
17
18
btnClear = new JButton("Clear");
btnEn = new JButton("Encrypt");
btnDe = new JButton("Decrypt");
19
20
21
22
btnClear. addActionListener(this);
btnEn. addActionListener(this);
btnDe. addActionListener(this);
23
24
25
txtIn= new JTextField(50);
26
txtout= new JTextField(50);
27
28
lblEn= new JLabel("Type your message to Encrypt here");
lblDe= new JLabel("Type your message to Decrypt here");
29
30
31
set Layout(new Grid Layout (7,1));
32
add (lblen);
33
add (txtIn);
34
add (lblDe);
35
add (txtOut);
36
add (btnEn);
37
add (btnDe);
38
add (btnClear);
39
40
setSize(300,300);
41
setVisible(true);
42
43
} // Constructor
44 public void action Performed (ActionEvent e)
45 ▼ {
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education