Bug 589 - Map content does not update after input (display error)
Summary: Map content does not update after input (display error)
Status: RESOLVED FIXED
Alias: None
Product: Group31Bullship
Classification: Unclassified
Component: Map (show other bugs)
Version: Demo 1.1
Hardware: PC Windows
: High major
Assignee: Kobayashi
URL:
Depends on:
Blocks:
 
Reported: 2021-11-20 22:46 HKT by Kannachan
Modified: 2021-11-20 22:57 HKT (History)
0 users

See Also:


Attachments
Screenshot of the map and console after entering input (82.39 KB, image/jpeg)
2021-11-20 22:46 HKT, Kannachan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kannachan 2021-11-20 22:46:11 HKT
Created attachment 93 [details]
Screenshot of the map and console after entering input

Problem description: 
The map does not show the route from the starting point to the ending point. It has no reactions after user input.

Step to reproduce: 
1. Run Main.java.
2. Enter the starting point and the destination point with appropriate integers (1 and 4 in this case) in the console.
3. Press enter.

Actual result: 
The content of the map remains unchanged. Yet, the console seems to work well. It continues prompting the users to enter another value.

Expected result: 
After entering the inputs, the map should be updated and show the route from the starting point to the endpoint using red arrows. Users can then keep entering the value and the map will keep changing.
Comment 1 Kobayashi 2021-11-20 22:57:50 HKT
We understand the situation. The bug occurs as the main.java function is missing a line "c.paintComponent(c.getGraphics());" for updating the panel's graphic. We fixed the bug by replacing the original line of code "c.repaint()" with this line of code.