2016-05-08 2 views
0

Javaコードをコンパイルしていますが、エラーがidentifier expectedと表示されています。jbuttonフォントサイズの変更が「識別子が期待されています」

private JButton AButton = new JButton("A"); 
Font myFont = new Font("Courier", Font.ITALIC,12); 
A.setFont(myFont); // error : identifier expected "  
+0

を質問次回を投稿する前に、あなたのコードをフォーマットしてください。 。 。 – Mike

+0

あなたの 'JButton'が' Autton'ではなく 'AButton'という名前を持つと宣言したので、' A'は宣言されていない識別子ではありません。 。 。 – Mike

答えて

0

使用AButtonの代わりA、あなたのラインが好きでなければならない:

AButton.setFont(myFont); 
関連する問題