import java.util.*;
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
//----------I could just do import java.awt.*; and import java.swing.*; but, when the program get larger, this could cause glitches, so it's better not to----------
public class Gui extends JFrame{
public class QA //THIS IS WHERE I'M GETTING THE ERROR MESSAGE
{
private int x;
private JButton reg;
private JButton custon;
public Gui();
public QA()
{
我从YouTube视频(https://www.youtube.com/watch?v=6iV-v_m0z0w)中删除了代码,但我不确定问题是什么。感谢任何帮助:)
答案 0 :(得分:0)
public Gui();
没有任何退货类型且没有任何实施,且它不应该在QA
将此构造函数方法移至Gui
class
public class Gui extends JFrame{
public Gui(){}
public class QA //THIS IS WHERE I'M GETTING THE ERROR MESSAGE
{
...
}