11 Commits

Author SHA1 Message Date
de4afed4ba Delete Savings.class 2022-05-19 13:28:06 +02:00
968324cfc2 Delete Checking.class 2022-05-19 13:27:58 +02:00
ffef137a6b Delete BankController.class 2022-05-19 13:27:50 +02:00
0d3aa4e536 Delete BankAccount.class 2022-05-19 13:27:41 +02:00
f9dccd7a7f Delete Listener.class 2022-05-19 13:27:30 +02:00
8a2c15f5bb Delete GUI2.class 2022-05-19 13:27:22 +02:00
c9487e2ef8 Delete GUI1.class 2022-05-19 13:27:15 +02:00
bb6c7cf4c5 Delete ButtonListener.class 2022-05-19 13:27:08 +02:00
c541e43d35 it should work 2022-05-19 13:24:33 +02:00
68b4873cfe it should work 2022-05-19 13:23:36 +02:00
2e15fc5835 partial debug 2022-05-19 13:04:14 +02:00
21 changed files with 20 additions and 1 deletions

View File

@ -5,5 +5,9 @@
"lib/**/*.jar"
],
"liveshare.shareExternalFiles": false,
"liveshare.allowGuestDebugControl": true
"liveshare.allowGuestDebugControl": true,
"cSpell.words": [
"Jlogo",
"Jname"
]
}

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.

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.

Binary file not shown.

Binary file not shown.

View File

@ -15,6 +15,7 @@ public class ManagerGui extends JFrame {
ImageIcon logo;
String buttonNameQuit = "Quit";
String buttonNameBill = "Show bill";
double ratio = 207.0/163.0;
Vector<Row> prestations = new Vector<>();
@ -37,6 +38,10 @@ public class ManagerGui extends JFrame {
Jlogo = new JLabel(logo);
Jname = new JLabel(name);
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);
@ -86,6 +91,16 @@ public class ManagerGui extends JFrame {
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);
}
}