Question: Boggle.java Add to method main() Instantiate an instance of class BoggleUi, passing the reference object of class Board as an argument userInterface package Create class

Boggle.java

Add to method main()

Instantiate an instance of class BoggleUi, passing the reference object of class Board as an argument

userInterface package

Create class BoggleUi

BoggleUi.java

Add member variables of type

JFrame

JMenuBar

JMenu

JMenuItem

JMenuItem

JPanel

JButton[][]

JPanel

JScrollPane

JTextPane

JLabel

JButton

JPanel

JLabel

JButton

JLabel

A custom constructor should be defined that receives a parameter of type Board class

Set member variable of type class Board to the parameter passed in

call method initComponents()

A method initComponents() should initialize all the components for the UI and called from the constructor

Set the default size of the JFrame

Set the default close operation of the JFrame

Use default layout manager BorderLayout

Set up the JMenuBar

JMenu Boggle should be added to the JMenuBar

JMenuItems New Game and Exit should be added to the JMenu Boggle

A JPanel should be created to hold the current word being created by the user

Recommend using default Layout Manager FlowLayout

A JLabel for the current word being created

A JButton to submit the current word created

A JLabel for the players score

A JPanel should be created to hold the JButtons of dice

The JPanel for the Boggle board should be a 4 x 4 grid that displays a JButton for each die

Recommend using Layout Manager GridLayout

A JPanel should be created to hold

Recommend using Layout Manager BoxLayout

the JTextArea for the user to enter their words

the JScrollPane for the JTextArea to scroll as necessary

the JLabel that displays time left for the current round of play

the JButton to shake the dice

JMenuBar should be set on the JFrame

Add all the components to the JFrame

Set the visibility of the JFrame

Test Cases

Action

Expected outcome

Test Case 1

User interface displays

User interface is similar to figure 1

Test Case 2

Boggle menu

Boggle menu looks like figure 2

Test case 3

Project view

Project view matches figure 3

 Boggle.java Add to method main() Instantiate an instance of class BoggleUi,passing the reference object of class Board as an argument userInterface packageCreate class BoggleUi BoggleUi.java Add member variables of type JFrame JMenuBar JMenu

Boggle Boggle Boggle Board Current Word Current Word Enter Words Found Time Left 3:00 Shake Dice Score Submit Word Figure 1 Test Case 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!