about = new JMenuItem("About");
about.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A((Toolkit.getDefaultToolkit().getMenuShortcutMask()))));
JMenu help = new JMenu("Help");
help.add(about);
我試圖使用下面的代碼來最終制作遊戲。代碼如下所示,工作。 import java.awt.event.*;
import javax.swing.*;
public class GUI extends JFrame implements ActionListener
{
public static void main(String[] args)
{
GUI g = ne