1 package org.ozoneDB.adminGui.feature.account.users; 8 9 import java.awt.GridBagConstraints ; 10 import java.awt.GridBagLayout ; 11 import java.awt.Insets ; 12 import javax.swing.JLabel ; 13 import javax.swing.JPanel ; 14 import javax.swing.JTextField ; 15 16 17 27 29 public class WorkUserPanel extends JPanel { 30 31 32 private JTextField userNameText = new JTextField (); 33 34 private JTextField userPasswordText = new JTextField (); 35 36 37 40 public WorkUserPanel() { 41 super(); 42 init(); 43 } 44 45 48 private void init() { 49 this.setLayout(new GridBagLayout ()); 50 51 this.add(new JLabel ("User Name:"), 53 new GridBagConstraints (0, 0, 1, 1, 0.0, 0.0, 54 GridBagConstraints.WEST, GridBagConstraints.NONE, 55 new Insets (10, 10, 0, 10), 0, 0)); 56 this.add(userNameText, 57 new GridBagConstraints (1, 0, 1, 1, 0.0, 0.0, 58 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 59 new Insets (10, 10, 0, 10), 150, 0)); 60 61 this.add(new JLabel ("User Password:"), 63 new GridBagConstraints (0, 1, 1, 1, 0.0, 0.0, 64 GridBagConstraints.WEST, GridBagConstraints.NONE, 65 new Insets (10, 10, 0, 10), 0, 0)); 66 this.add(userPasswordText, 67 new GridBagConstraints (1, 1, 1, 1, 0.0, 0.0, 68 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, 69 new Insets (10, 10, 0, 10), 150, 0)); 70 } 71 72 77 public String getUserName() { 78 return userNameText.getText(); 79 } 80 81 86 public String getUserPassword() { 87 return userPasswordText.getText(); 88 } 89 90 } | Popular Tags |