不同的班级
package battleship;
public class GameSum extends javax.swing.JFrame {
public GameSum() {
initComponents();
J_time.setText(score);
}
package battleship;
public class GameScreen extends javax.swing.JFrame {
protected int score;
public GameScreen() {
initComponents();
}
private void B_checkActionPerformed(java.awt.event.ActionEvent evt) {
if (score < getHS(0) && score < hs[1]) {setHS(0, score, nickname); }
for (int loop = 0; loop<5; loop++)
{
if(score > hs[loop] && score < hs[loop+1]) {setHS(loop+1, score, nickname); }
}
}