From 9bdae273d832f26f7cff0a4b861eba442313b67f Mon Sep 17 00:00:00 2001 From: David Groys Date: Mon, 10 Jun 2024 16:13:54 +0200 Subject: [PATCH] first (maybe last) commit of User pofile which is shown on app Panel --- src/main/java/de/hs_mannheim/ui/Main.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/de/hs_mannheim/ui/Main.java b/src/main/java/de/hs_mannheim/ui/Main.java index faa69ad..00aa7fa 100644 --- a/src/main/java/de/hs_mannheim/ui/Main.java +++ b/src/main/java/de/hs_mannheim/ui/Main.java @@ -156,6 +156,23 @@ public class Main extends JFrame { jframe.setVisible(true); } + private void profileCreate() { + profile = new JPanel(new FlowLayout()); + ImageIcon png = png("profile.png", 30, 30); + JLabel jl = new JLabel(png); + String[] details = facade.getUserDetails(); // 6 bzw 7 + JLabel jlTXT = new JLabel("Name: " + details[0] + + "\nWohnort: " + details[1] + + "\nPlz: " + details[2] + + "\nAuto Name: " + details[3] + + "\nAuto km/h: " + details[4] + + "\nCO2/100km: " + details[5] + + "\nFahrrad km/h: " + details[6] + + "\nWetter: " + facade.current_weather()); + profile.add(jl); + profile.add(jlTXT); + } + private void errorMessageCreate() { errorMessage = new JPanel(); JLabel jl = new JLabel("Daten sind falsch oder unvollständig!");