I'm trying to use SpringUtilities.makeGrid() in java, to create the interface of a Form, I've read that it should be linked to the source that is in the Oracle documentation but online I haven't found anything, and it keeps returning the error "Syntax error on token "makeGrid"", would anyone be able to help me?
package FrontEnd.Panel;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import FrontEnd.Interface.setButton;
import javax.swing.*;
import java.awt.*;
public class FormPanel extends JPanel implements ActionListener, setButton {
JLabel labelForForm[];
JTextField textFieldForForm[];
public FormPanel() {
labelForForm = new JLabel[4];
textFieldForForm = new JTextField[3];
createFormElements();
setLayout(new SpringLayout());
setVisible(true);
setBorder(BorderFactory.createLineBorder(Color.RED));
}
SpringUtilities.makeGrid(
);
public void createFormElements() {
String[] labelText = { "Inserisci nome", "Inserisci cognome", "Inserisci data di nascita",
"Seleziona reparto" };
String titleForm = "Digita i dati richiesti";
for (int i = 0; i < labelForForm.length; i++) {
labelForForm[i] = new JLabel(labelText[i]);
if (i < labelForForm.length - 1) {
textFieldForForm[i] = new JTextField(16);
add(textFieldForForm[i]);
} else {
}
add(labelForForm[i]);
}
setFormElements();
}
public void setFormElements() {
}
@Override
public void setButton() {
// TODO Auto-generated method stub
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}