1 Commits

Author SHA1 Message Date
60718d7c35 small polish 2022-05-19 09:35:06 +02:00
21 changed files with 4 additions and 16 deletions

View File

@ -7,7 +7,9 @@
"liveshare.shareExternalFiles": false, "liveshare.shareExternalFiles": false,
"liveshare.allowGuestDebugControl": true, "liveshare.allowGuestDebugControl": true,
"cSpell.words": [ "cSpell.words": [
"Jframe",
"Jlogo", "Jlogo",
"Jname" "Jname",
"Mudry"
] ]
} }

Binary file not shown.

BIN
bin/BillGUI/BillGui$1.class Normal file

Binary file not shown.

BIN
bin/BillGUI/BillGui.class Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/BillGUI/Row.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/GUI/GUI1.class Normal file

Binary file not shown.

BIN
bin/GUI/GUI2.class Normal file

Binary file not shown.

BIN
bin/GUI/Listener.class Normal file

Binary file not shown.

BIN
bin/bank/BankAccount.class Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/bank/Checking.class Normal file

Binary file not shown.

BIN
bin/bank/Savings.class Normal file

Binary file not shown.

View File

@ -15,7 +15,6 @@ public class ManagerGui extends JFrame {
ImageIcon logo; ImageIcon logo;
String buttonNameQuit = "Quit"; String buttonNameQuit = "Quit";
String buttonNameBill = "Show bill"; String buttonNameBill = "Show bill";
double ratio = 207.0/163.0;
Vector<Row> prestations = new Vector<>(); Vector<Row> prestations = new Vector<>();
@ -38,10 +37,6 @@ public class ManagerGui extends JFrame {
Jlogo = new JLabel(logo); Jlogo = new JLabel(logo);
Jname = new JLabel(name); Jname = new JLabel(name);
this.add(Jname); this.add(Jname);
//logo = new ImageIcon(new ImageIcon(logoFilePath).getImage().getScaledInstance(207, 163, Image.SCALE_DEFAULT));
//Jlogo = new JLabel(logo);
Jlogo = resize(Jname, logoFilePath);
this.add(Jlogo); this.add(Jlogo);
@ -84,6 +79,7 @@ public class ManagerGui extends JFrame {
@Override @Override
public void actionPerformed(ActionEvent e){ public void actionPerformed(ActionEvent e){
Jf.dispose(); Jf.dispose();
System.exit(0);
}; };
}); });
@ -91,16 +87,6 @@ public class ManagerGui extends JFrame {
this.add(buttonQuit); this.add(buttonQuit);
} }
private JLabel resize(JLabel Jlogo, String logoFilePath){
//TODO put in listener for resize when frame is resize.
int width = (int)Jlogo.getSize().getWidth();
int height = (int)Jlogo.getSize().getHeight();
height = height > 0 ? height:65;
System.out.println(width + "x"+ height);
ImageIcon logo = new ImageIcon(new ImageIcon(logoFilePath).getImage().getScaledInstance((int) (height*ratio), height, Image.SCALE_DEFAULT));
return new JLabel(logo);
}
} }