I am trying to create an applet that will replace a confusing CLI with a nice JavaFX GUI. I don't have extensive experience with GUI design and most of what we learned in the classroom environment was Swing/AWT. Having toyed a little bit with JavaFX, I feel that it has already shown to be far better, however there aren't many good tutorials/articles out there about creating JavaFX programs intended to run as applets. Right now I can't even seem to convert the following simple login UI from Swing to JavaFX.
import java.applet.Applet;
import java.awt.*;
import javax.swing.*;
public class ACLEditor extends Applet {
public void init() {
/* Basic Layout */
setLayout(new GridLayout(5, 2));
/* Components */
JLabel username_l = new JLabel("Username:");
JTextField username = new JTextField("", 10);
JLabel password_l = new JLabel("Password:");
JPasswordField password = new JPasswordField("", 10);
JLabel hostname_l = new JLabel("Hostname:");
JTextField hostname = new JTextField("0.0.0.0", 10);
JButton connect_btn = new JButton("Connect");
/* Place all Controls on the Layout */
add(username_l);
add(username);
add(password_l);
add(password);
add(hostname_l);
add(hostname);
add(connect_btn);
}
}
Any help on this would be appreciated. Note: I do understand how to create a JavaFX UI for a standalone application, I just can't seem to grasp how to make it into an applet