You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.7 KiB

  1. package MeinBudgetView;
  2. import java.awt.BorderLayout;
  3. import java.awt.EventQueue;
  4. import javax.swing.JFrame;
  5. import javax.swing.JPanel;
  6. import javax.swing.border.EmptyBorder;
  7. import javax.swing.JButton;
  8. import javax.swing.JPasswordField;
  9. import javax.swing.JTextField;
  10. import javax.swing.JLabel;
  11. import java.awt.Color;
  12. public class LoginFrame extends JFrame {
  13. private JPanel contentPane;
  14. private JPasswordField passwordField;
  15. private JTextField textField;
  16. /**
  17. * Launch the application.
  18. */
  19. public static void main(String[] args) {
  20. EventQueue.invokeLater(new Runnable() {
  21. public void run() {
  22. try {
  23. LoginFrame frame = new LoginFrame();
  24. frame.setVisible(true);
  25. } catch (Exception e) {
  26. e.printStackTrace();
  27. }
  28. }
  29. });
  30. }
  31. /**
  32. * Create the frame.
  33. */
  34. public LoginFrame() {
  35. setTitle("Anmelden");
  36. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  37. setBounds(100, 100, 450, 300);
  38. contentPane = new JPanel();
  39. contentPane.setBackground(Color.WHITE);
  40. contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  41. setContentPane(contentPane);
  42. contentPane.setLayout(null);
  43. JButton anmelden = new JButton("Anmelden");
  44. anmelden.setBounds(182, 168, 97, 23);
  45. contentPane.add(anmelden);
  46. passwordField = new JPasswordField();
  47. passwordField.setBounds(147, 137, 132, 20);
  48. contentPane.add(passwordField);
  49. textField = new JTextField();
  50. textField.setBounds(147, 106, 132, 20);
  51. contentPane.add(textField);
  52. textField.setColumns(10);
  53. JLabel lblNewLabel = new JLabel("Benutzername:");
  54. lblNewLabel.setBounds(48, 106, 89, 20);
  55. contentPane.add(lblNewLabel);
  56. JLabel lblNewLabel_1 = new JLabel("Password: ");
  57. lblNewLabel_1.setBounds(61, 140, 76, 14);
  58. contentPane.add(lblNewLabel_1);
  59. }
  60. }