Browse Source

Commit_35 2x JLabel in der Klasse LoginFrame implementiert

Mohamed
Adah Boukhari 5 years ago
parent
commit
cccd6be316
  1. BIN
      Budget Projekt/Image/login-icon.png
  2. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class
  3. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame.class
  4. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui$2.class
  5. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui.class
  6. BIN
      Budget Projekt/bin/login-icon.png
  7. 33
      Budget Projekt/src/MeinBudgetView/LoginFrame.java
  8. 1
      Budget Projekt/src/MeinBudgetView/MeinGui.java

BIN
Budget Projekt/Image/login-icon.png

After

Width: 48  |  Height: 48  |  Size: 4.5 KiB

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame.class

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui$2.class

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui.class

BIN
Budget Projekt/bin/login-icon.png

After

Width: 48  |  Height: 48  |  Size: 4.5 KiB

33
Budget Projekt/src/MeinBudgetView/LoginFrame.java

@ -2,10 +2,13 @@ package MeinBudgetView;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Image;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import javax.swing.ImageIcon;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JPasswordField; import javax.swing.JPasswordField;
import javax.swing.JTextField; import javax.swing.JTextField;
@ -43,7 +46,7 @@ public class LoginFrame extends JFrame {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300); setBounds(100, 100, 450, 300);
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setBackground(Color.WHITE);
contentPane.setBackground(Color.CYAN);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane); setContentPane(contentPane);
contentPane.setLayout(null); contentPane.setLayout(null);
@ -61,12 +64,28 @@ public class LoginFrame extends JFrame {
contentPane.add(textField); contentPane.add(textField);
textField.setColumns(10); textField.setColumns(10);
JLabel lblNewLabel = new JLabel("Benutzername:");
lblNewLabel.setBounds(48, 106, 89, 20);
contentPane.add(lblNewLabel);
JLabel labaelBenutzername = new JLabel("Benutzername:");
labaelBenutzername.setBounds(48, 106, 89, 20);
contentPane.add(labaelBenutzername);
JLabel labelPassword = new JLabel("Password: ");
labelPassword.setBounds(61, 140, 76, 14);
contentPane.add(labelPassword);
JLabel loginImage = new JLabel("");
loginImage.setBounds(313, 106, 56, 51);
Image image1 = new ImageIcon(this.getClass().getResource("/login-icon.png")).getImage();
loginImage.setIcon(new ImageIcon(image1));
loginImage.setFont(new Font("Tahoma", Font.BOLD, 13));
contentPane.add(loginImage);
JLabel loginHauptImage = new JLabel("");
loginHauptImage.setBounds(10, 11, 56, 51);
Image image2 = new ImageIcon(this.getClass().getResource("/budgetapp.png")).getImage();
loginHauptImage.setIcon(new ImageIcon(image2));
loginHauptImage.setFont(new Font("Tahoma", Font.BOLD, 13));
contentPane.add(loginHauptImage);
JLabel lblNewLabel_1 = new JLabel("Password: ");
lblNewLabel_1.setBounds(61, 140, 76, 14);
contentPane.add(lblNewLabel_1);
} }
} }

1
Budget Projekt/src/MeinBudgetView/MeinGui.java

@ -79,6 +79,7 @@ public class MeinGui extends JFrame implements ActionListener {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 654, 368); setBounds(100, 100, 654, 368);
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setBackground(Color.CYAN);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane); setContentPane(contentPane);
contentPane.setLayout(null); contentPane.setLayout(null);

Loading…
Cancel
Save