Please help with Ceaser Cipher in JavaFX!! Here is my code: package testweek8; import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionListener; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import java.io.*; import java.util.List;

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 3VE
icon
Related questions
Question

Please help with Ceaser Cipher in JavaFX!!

Here is my code:
package testweek8;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.io.*;
import java.util.List;


public class TestWeek8 {
private static int constant;
private static String alphabet;

public static void main (String[]args) {
displayMenu();
getPhrase();
}

private Static ActionListener;
myActionListener;


public void loadData(){
char[] alphabet;
for (char c = 'a';c <= 'z'; ++c) {
alphabet [c - 'a'] = c;
}
}
public static void displayMenu(){
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setBackground(Color.darkGray);
panel.setLayout(new BoxLayout.LINE _Axis);
JButton button1 = new JButton("Decode a message");
button1.addActionListner(myActionListner);
JButton button2 = new JButton("Encode a message");
button2.addActionListner(myActionListner);
JButton button3 = new JButton("Display a message");
button1.addActionListner(myActionListner);
JButton button4 = new JButton("Exit the program");
button1.addActionListner(myActionListner);
panel1.add(button1);
panel1.add(button2);
panel1.add(button3);
panel1.add(button4);
frame.getContentPane().add(BorderLayout.Center.panel);
frame.setSize(575,300);
frame.setVisible(true);
}
public static void getPhrase(){

JTextField(" ");
System.out.printlnfield.getText());
}

public String encodeMessage(String field) {
int coded;
int temp;
StringBuffer s = new StringBuffer();
String Field;
field = field.toLowerCase();

for(int index = 0; index<field.length();index++){
temp = findNum(field.charAt(index));
if(temp! = -1) {
coded multi = findNum(field.charAt(index))+constant;
if(coded>25) {
temp = coded/26;
coded = coded-(temp*26);}

 

What I'm trying to do is this: The GUI that you will develop is the “front-end” of the project. The “back-end” is the translate() method that you will (re-)use. I also should mention that this all needs to be done in Netbeans.

I keep getting this message when I run it:

Browse JavaFX Application Classes
Available dasses:
Select Class
Cancel
Transcribed Image Text:Browse JavaFX Application Classes Available dasses: Select Class Cancel
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
JQuery and Javascript
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
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage