Hi, Hope you are doing well. Here, I share you a project idea fro java swing.
Problem Statement:
We will be initiating the development cycle of a product we want to push to market, a Java-
based two-player Othello game. R&D has decided that Othello (historically also known as
Reversi) will be very popular with the 18-27 demographic and we’d like to get our product
out to market as soon as possible. You have been hired as the UI coding specialist to code
the UI we have developed.
But seriously:
In this series of assignments, we will be creating an Othello game. This part of the
assignment revolves around the creation of the UI. This assignment is based on material that
has been covered in lectures, lab exercises, and hybrid activities. Your job is to replicate this
UI as closely as possible, using the materials taught to you in lectures, labs and hybrids.
Figure 1: Screenshot of the UI
We’ll be implementing the game logic in part 2 of this assignment, following the “Model-
View-Controller” style. This is reflected in some of the requirements in this assignment.
Every requirement is here for a good reason.
Requirements:
Each square on the board must be 60x60 pixels, with white in the upper left corner. The
board must display the pieces as shown. Graphic files for the pieces will be provided to you,
and you must use those. The blue zone to the right must have a preferred width of 450
pixels.
Sizes:
Each square on the board is 60x60 pixels.
The blue zone has a width of 450 pixels.
The move and arrow buttons are each 40x40 pixels.
Colours:
All the gray background is set to RGB 220, 220, 220.
The blue chat output box is set to RGB 175, 175, 255.
All borders use the default gray.
The “Submit” button in the bottom right has a black background and red font.
All other buttons have a white background.
Fonts:
All fonts must remain the default font.
The font size of the board labels is 20 points
The font size of the player names and the scores are all 15 points
The font size of the move button is 10 points.
All other sizes remain default.
Borders:
Thick borders are five pixels wide
There is a one-pixel border around the board itself.
All borders are in Java’s predefined gray colour.
All text regions (other than the move button) have interior padding of 5 pixels.
Miscellanea:
This layout uses Java’s default look and feel.
The frame (or stage) must not be resizable.
Your board labels must be contained in an 8x8 two-dimensional array. (Helpful
Hint:
You’ll be referring to it a lot for part 2.)
All pieces should be centered in their labels (graphics for the pieces will be provided for you).
Your name must appear in the title bar, along with “Othello Client”.
You may ONLY use BorderLayout, FlowLayout and GridLayout (or the JavaFX
equivalent). This UI must be assembled manually. UI builders are not permitted.
Code:
You will need three class files for this assignment: Othello, OthelloSplashScreen, and
OthelloViewController. All code must be in package othello. Case is important.
Class Othello
This is the launch point. It will contain your main (or start) method. It will instantiate and
launch your splash screen, and then launch the main Othello game proper after the splash screen is finished.
Class OthelloSplashScreen
This class will manage the splash screen. This splash screen should stay on between five to ten seconds. The splash screen should have an image that reflects you (or your imaginary company), or the game itself. It must also contain your name.
Class OthelloViewController
OthelloViewController will assemble the UI, primarily in its default constructor. NOTE: If you are using Swing, OthelloViewController must extend JFrame. You may have to define your JFrame parameters in OthelloViewController instead of the Othello class.
If you are using JavaFX, OthelloViewController may extend Scene, Pane or any descended Pane subclass as you see fit.
Class Controller
OthelloViewController must also have an inner class called Controller. You will use this to
manage all of your buttons and the checkbox. No other means may be used to manage the buttons.The Controller class will have very basic code. It reads the action command (or JavaFX equivalent) of the button that was pressed, and then prints it to the console. All buttons (and the checkbox) must have a unique action command.
If you need solution of these questions or looking any other Java GUI assignment help then you can contact with us and get instant help.
.
Comments