invalid method declaration, return type required, on a GUI
So im trying to make a simple GUI that goes up by one when you click a button in it. I get this error, however, when i try and run the test GUI: Error. Here is the code
import javax.swing.JFrame;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
public class Main {
public GUI() {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setBorder(borderFactory.createEmptyBorder(30, 30, 10, 30));
panel.setLayout(new GridLayout(0, 1));
frame.add(panel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("Clicks");
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args) {
new GUI();
}
}
from Recent Questions - Stack Overflow https://ift.tt/36hTbTk
https://ift.tt/eA8V8J
Comments
Post a Comment