-
-
Save Sadin/b2098cf568e8e44d0380 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "main" java.lang.Error: Unresolved compilation problem: | |
at Minesweeper.main(Minesweeper.java:14) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import javax.swing.*; | |
import java.awt.GridLayout; | |
public class Minesweeper extends JFrame | |
{ JPanel board = new JPanel(); | |
public static void main(String[] args) | |
{ | |
} | |
public Minesweeper() | |
{ | |
int a,b; | |
Scanner s = new Scanner(System.in); | |
System.out.println("Enter board dimensions:"); | |
a = s.nextInt(); | |
b = s.nextInt(); | |
setSize(600,600); | |
setDefaultCloseOperation(EXIT_ON_CLOSE); | |
board.setLayout(new GridLayout(a,b)); | |
int y,x = 0; | |
int counter = 0; | |
while(counter<a){ | |
for(x) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dialog;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Minesweeper implements ActionListener
{
int a,b;
a = Integer.parseInt(responsex);
b = Integer.parseInt(responsey);
JFrame frame = new JFrame("Minesweeper");
JButton reset = new JButton("Reset");
JButton[][] buttons = new JButton[a][b];
int[][] counts = new int[a][b];
Container grid = new Container();
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem: