Compare commits
1 Commits
debug-logo
...
polish-all
Author | SHA1 | Date | |
---|---|---|---|
60718d7c35 |
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -7,7 +7,9 @@
|
||||
"liveshare.shareExternalFiles": false,
|
||||
"liveshare.allowGuestDebugControl": true,
|
||||
"cSpell.words": [
|
||||
"Jframe",
|
||||
"Jlogo",
|
||||
"Jname"
|
||||
"Jname",
|
||||
"Mudry"
|
||||
]
|
||||
}
|
||||
|
BIN
bin/BillGUI/BillGui$1$1.class
Normal file
BIN
bin/BillGUI/BillGui$1$1.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/BillGui$1.class
Normal file
BIN
bin/BillGUI/BillGui$1.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/BillGui.class
Normal file
BIN
bin/BillGUI/BillGui.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/ButtonListenerBill.class
Normal file
BIN
bin/BillGUI/ButtonListenerBill.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/ButtonListenerManager.class
Normal file
BIN
bin/BillGUI/ButtonListenerManager.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/GarageManager.class
Normal file
BIN
bin/BillGUI/GarageManager.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/HesSoGarage.class
Normal file
BIN
bin/BillGUI/HesSoGarage.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/ManagerGui$1.class
Normal file
BIN
bin/BillGUI/ManagerGui$1.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/ManagerGui$2.class
Normal file
BIN
bin/BillGUI/ManagerGui$2.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/ManagerGui.class
Normal file
BIN
bin/BillGUI/ManagerGui.class
Normal file
Binary file not shown.
BIN
bin/BillGUI/Row.class
Normal file
BIN
bin/BillGUI/Row.class
Normal file
Binary file not shown.
BIN
bin/GUI/ButtonListener.class
Normal file
BIN
bin/GUI/ButtonListener.class
Normal file
Binary file not shown.
BIN
bin/GUI/GUI1.class
Normal file
BIN
bin/GUI/GUI1.class
Normal file
Binary file not shown.
BIN
bin/GUI/GUI2.class
Normal file
BIN
bin/GUI/GUI2.class
Normal file
Binary file not shown.
BIN
bin/GUI/Listener.class
Normal file
BIN
bin/GUI/Listener.class
Normal file
Binary file not shown.
BIN
bin/bank/BankAccount.class
Normal file
BIN
bin/bank/BankAccount.class
Normal file
Binary file not shown.
BIN
bin/bank/BankController.class
Normal file
BIN
bin/bank/BankController.class
Normal file
Binary file not shown.
BIN
bin/bank/Checking.class
Normal file
BIN
bin/bank/Checking.class
Normal file
Binary file not shown.
BIN
bin/bank/Savings.class
Normal file
BIN
bin/bank/Savings.class
Normal file
Binary file not shown.
@ -15,7 +15,6 @@ 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<>();
|
||||
@ -38,10 +37,6 @@ 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);
|
||||
|
||||
|
||||
@ -84,6 +79,7 @@ public class ManagerGui extends JFrame {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e){
|
||||
Jf.dispose();
|
||||
System.exit(0);
|
||||
};
|
||||
});
|
||||
|
||||
@ -91,16 +87,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user