Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Germief committed May 8, 2021
1 parent 96e0a1e commit b9a4606
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/simulator/view/BodiesTableModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ public int getRowCount() {
public int getColumnCount() {
return columnNames.length;
}


@Override
public String getColumnName(int col) {
return columnNames[col];
}

@Override
public Object getValueAt(int rowIndex, int columnIndex) {
Body b = _bodies.get(rowIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/simulator/view/ControlPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void actionPerformed(ActionEvent e) {

this.play = new JButton();
toolBar.add(play);
play.setIcon(new ImageIcon("resources\\icons\\physics.png"));
play.setIcon(new ImageIcon("resources\\icons\\run.png"));
play.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
_stopped = false;
Expand Down
3 changes: 2 additions & 1 deletion src/simulator/view/StatusBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class StatusBar extends JPanel implements SimulatorObserver {
private JLabel _numOfBodies; // for number of bodies

StatusBar(Controller ctrl) {
ctrl.addObserver(this);
_ctrl = ctrl;
steps=0;
bodies = 0;
Expand All @@ -35,6 +34,8 @@ public class StatusBar extends JPanel implements SimulatorObserver {
_currLaws = new JLabel("Laws:: "+String.valueOf(this.law));
_numOfBodies = new JLabel("Bodies: "+String.valueOf(this.bodies));
initGUI();
ctrl.addObserver(this);

}

private void initGUI() {
Expand Down

0 comments on commit b9a4606

Please sign in to comment.