private JButton rewind, playpause, stop, fastforward;
private JLabel measure, beats, ticks, measureValue, beatsValue, ticksValue;
+ private JPanel progIndPanel;
private ImageIcon playIcon, pauseIcon;
private MooMouseAdapter mouseAdapter;
public static final Color bgColor = new Color(192, 224, 255);
spacesouth.setBackground(bgColor);
// Creates progress indicator panel and adds components
- JPanel progIndPanel = new JPanel();
+ progIndPanel = new JPanel();
progIndPanel.setMaximumSize(new Dimension(120,27));
progIndPanel.setLayout(new GridLayout(2,4));
progIndPanel.add(spacenorth);
long measures = tickPosition / (beatsPerMeasure * ticksPerBeat);
long beats = (tickPosition - measures * beatsPerMeasure * ticksPerBeat) / ticksPerBeat;
long ticks = tickPosition - measures * beatsPerMeasure * ticksPerBeat - beats * ticksPerBeat;
- measureValue.setText(Long.toString(measures));
- beatsValue.setText(Long.toString(beats));
- ticksValue.setText(Long.toString(ticks));
+ measureValue.setText(Long.toString(1 + measures));
+ beatsValue.setText(Long.toString(1 + beats));
+ ticksValue.setText(Long.toString(1 + ticks));
}
/*