Skip to content

Commit

Permalink
Added Back button to InputDataFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
MrThanasiz committed Jun 13, 2019
1 parent 9711fa9 commit a7a7ab0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
30 changes: 27 additions & 3 deletions src/InputDataFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public class InputDataFrame {
private static final int LB_Y=HEIGHT*43/100;


//Next button
//Next/Back button
private static final int NB_X=WIDTH*70/100;
private static final int BB_X=WIDTH*20/100;
private static final int NB_Y=HEIGHT*80/100;
private static final int NB_WIDTH=WIDTH*13/100;
private static final int NB_WIDTH=WIDTH*18/100;
private static final int NB_HEIGHT=HEIGHT*5/100;


Expand Down Expand Up @@ -192,10 +193,33 @@ else if (i==4) {
}
});






//Next screen button
JButton buttonNext=new JButton("Select Universities");
JButton buttonNext=new JButton("Select Universities");
if (stud.getAcademicYear()!=0) {

}

//Back Button (MainFrame)
JButton buttonBack=new JButton("Back to Tips");
buttonBack.setBounds(BB_X,NB_Y,NB_WIDTH,NB_HEIGHT);
if (stud.getAcademicYear()!=0) {
buttonNext.setText("Save scores & Select Universities");
f.add(buttonBack);
f.revalidate();
f.repaint();
}
buttonBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
f.dispose();
new MainFrame(stud);
}
});

buttonNext.setBounds(NB_X,NB_Y,NB_WIDTH,NB_HEIGHT);
f.add(buttonNext);
buttonNext.addActionListener(new ActionListener() {
Expand Down
2 changes: 0 additions & 2 deletions src/UniversitySelectFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ public void actionPerformed(ActionEvent e) {
stud.setScores(scores);
CentralRegistry.serializeUsers();
f.dispose();


new MainFrame(stud);
}
}
Expand Down

0 comments on commit a7a7ab0

Please sign in to comment.