This repository has been archived by the owner on Apr 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbc2e62
commit 18ecc8d
Showing
22 changed files
with
59 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import java.awt.event.*; | ||
import javax.swing.*; | ||
import java.awt.*; | ||
|
||
public class achGUI extends JFrame implements ActionListener{ | ||
private JMenuBar menuBar = new JMenuBar(); | ||
private JPanel seaEnemy = new JPanel(); | ||
private JPanel seaFriendly = new JPanel(); | ||
private JPanel LeftInfoBar = new JPanel(); | ||
private JPanel RigtInfoBar = new JPanel(); | ||
private final int sideLength=10; | ||
|
||
public achGUI(){ | ||
setSize(1200,800); | ||
setTitle("Battleship!"); | ||
setJMenuBar(menuBar); | ||
setLayout(new FlowLayout()); | ||
menuBar.setVisible(true); | ||
setVisible(true); | ||
} | ||
|
||
public void InitializeGrid() { | ||
add(seaFriendly); | ||
add(seaEnemy); | ||
} | ||
|
||
public void InitializeLeftBar() { | ||
add(LeftInfoBar); | ||
} | ||
|
||
public void InitializeRigtBar() { | ||
add(RigtInfoBar); | ||
} | ||
|
||
public void actionPerformed(ActionEvent e) { | ||
|
||
} | ||
|
||
public static void main(String[] args) { | ||
achGUI c=new achGUI(); | ||
|
||
} | ||
|
||
} |