Cuando ejecuto mi codigo, resivo este error
===Error====
Error: Main method not found in class Invie, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
====Main====
public class Main {
public static void main(String[] args) {
Invie myMenu = new Invie();
myMenu.Menu(showList);
}
}
===Método===
public static void Menu (String showList) {
String listMenu = "";
JOptionPane.showMessageDialog(null, "Welcome to Invie App\n Creator: Wesly J. Hernandez");
JOptionPane.showMessageDialog(null, "This application is designed to help the user to have a better contror of his invention and buy.", "Purpose of the application", JOptionPane.INFORMATION_MESSAGE);
String user = JOptionPane.showInputDialog(null, "User", "Login", JOptionPane.INFORMATION_MESSAGE);
String passworld = JOptionPane.showInputDialog(null, "Password", "Login", JOptionPane.INFORMATION_MESSAGE);
if ("adim".equals(user) && "myPassword".equals(passworld)) {
JOptionPane.showMessageDialog(null, "Login successfuly", "Login", JOptionPane.INFORMATION_MESSAGE);
}
else {
JOptionPane.showMessageDialog(null, "Login failed\n Please try agen", "Login", JOptionPane.INFORMATION_MESSAGE);
}
do {
listMenu = JOptionPane.showInputDialog(null, "a. Add items\n b. Show items\n c. Remove items\n x. Exit", "Menu", JOptionPane.INFORMATION_MESSAGE);
if (listMenu.equals ("a")) {
JOptionPane.showInputDialog(null, "Upc Number of product:\n", "Addign items", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showInputDialog(null, "Name of product:\n", "Addign items", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showInputDialog(null, "Date of product:\n", "Addign items", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showInputDialog(null, "Quantity Sold of product:\n", "Addign items", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showInputDialog(null, "Items Prices of product:\n", "Addign items", JOptionPane.INFORMATION_MESSAGE);
}
else if (listMenu.equals ("b")) {
JOptionPane.showMessageDialog(null, "Showing items");
// String showingList = showList;
}
else if (listMenu.equals ("c")) {
JOptionPane.showConfirmDialog(null,"Are you sure you want to delete a product? ", "Delet the items", JOptionPane.YES_NO_CANCEL_OPTION);
}
else if (listMenu.equals ("x")) {
JOptionPane.showMessageDialog(null, "Thank you for user own system. See it soon!", "Exit!", JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
else {
JOptionPane.showMessageDialog(null, "Please try agen.", "Error!", JOptionPane.ERROR_MESSAGE);
}
}while(!listMenu.equals("x"));