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;

Microsoft Windows 10 Comprehensive 2019
1st Edition
ISBN:9780357392607
Author:FREUND
Publisher:FREUND
Chapter6: Advanced Searching Techniques
Section: Chapter Questions
Problem 18AYK
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Windows 10 Comprehensive 2019
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:
9780357392607
Author:
FREUND
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage