I am trying to create some easier ways for me to create a GUI, and I'm trying to create a method with parameters that I will call in the method. I'm quite new to Swing (and Java).
This is what I am TRYING to do.
public static void createLabel(String labelName, String labelText) {
JLabel labelName = new JLabel();
labelName.setText(labelText);
mainFrame.add(labelName);
}
This is what I'm trying to do but to be honest, I don't even know if it is possible!
Thanks for reading!