【发布时间】:2015-05-03 07:19:30
【问题描述】:
private GameController gc = new GameController();
private boolean timerstart = false;
private JButton bhit = new JButton("HIT");
private JButton bstand = new JButton("STAND");
private JButton bdd = new JButton("DOUBLE DOWN");
// private JButton bsplit = new JButton("SPLIT")
private JButton 5chips = new JButton("5");
private JButton 10chips = new JButton("10");
private JButton 25chips = new JButton("25");
private JButton 100chips = new JButton("100");
private JTextArea tap = new JTextArea(5,5);
private JTextArea tad = new JTextArea(5,5);
private JTextArea tac = new JTextArea("Welcome to BlackJack Simulator!",1,5);
private Container cp = getContentPane();
// create the panel containing panels
private JPanel mainchippanel = new JPanel(new FlowLayout());
// create the panel to contain the buttons
private JPanel chipandta = new JPanel(new BorderLayout());
private JPanel chipbuttons = new JPanel(new FlowLayout());
private JPanel playeroptions = new JPanel(new FlowLayout());
private JPanel optnsandta = new JPanel(new BorderLayout());
private JPanel mainoptnpanel = new JPanel(new FlowLayout());
private JPanel handdisplays = new JPanel(new BorderLayout());
private JPanel main1 = new JPanel(new BorderLayout());
private JPanel main2 = new JPanel(new BorderLayout());
我正在制作一个小程序,由于某种原因,只有从 gc 到 bdd 的代码被识别,就好像 5chips 及以后的 JButton 中的所有代码都不存在。
我知道这一点是因为类视图没有显示对 bdd 之后的代码的引用,并且对于每个对 bdd 之后的对象的引用,输出不断给出“预期”错误。
我不知道为什么会发生这种情况,因此我们将不胜感激。谢谢。
【问题讨论】:
-
您遇到了什么异常?..在问题中发布..并发布完整的课程代码..
-
所以,代码没有编译,是你的问题吗?如果是这样,您从编译器获得的准确且完整的错误消息是什么?它指的是哪一行?
-
无法识别?不理会类视图,请发布实际异常(不是 Eclipse 消息)和编译器给您的错误。清理你的项目并重建它,看看它是否消失了。
-
原来问题出在芯片的变量名上。抱歉这个愚蠢的问题。