⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 workuserpanel.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Library License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//
package org.ozoneDB.adminGui.feature.account.users;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;


//#############################################################################
/**
 * This class creates the input panel that queries for the account and password
 * strings.
 *
 * @author  <p align=center>Ibsen Ramos-Bonilla
 * <br>Copyright &copy 1997-@year@ by SMB GmbH. All Rights Reserved.</p>
 *
 * @version 1.0
 */
//#############################################################################

public class WorkUserPanel extends JPanel {

    /** The text field used to enter the account name. */
    private JTextField userNameText = new JTextField();
    /** The text field used to enter the account password. */
    private JTextField userPasswordText = new JTextField();


    /**
     * Default constructor.
     */
    public WorkUserPanel() {
        super();
        init();
    }

    /**
     * This method initializes the input panel which gets the account information.
     */
    private void init() {
        this.setLayout(new GridBagLayout());

        //add account name section
        this.add(new JLabel("User Name:"),
                new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
                        GridBagConstraints.WEST, GridBagConstraints.NONE,
                        new Insets(10, 10, 0, 10), 0, 0));
        this.add(userNameText,
                new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
                        GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                        new Insets(10, 10, 0, 10), 150, 0));

        //add account password section
        this.add(new JLabel("User Password:"),
                new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
                        GridBagConstraints.WEST, GridBagConstraints.NONE,
                        new Insets(10, 10, 0, 10), 0, 0));
        this.add(userPasswordText,
                new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,
                        GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
                        new Insets(10, 10, 0, 10), 150, 0));
    }

    /**
     * This method returns the account name.
     *
     * @return String - account name.
     */
    public String getUserName() {
        return userNameText.getText();
    }

    /**
     * This method returns the account password.
     *
     * @return String - account password.
     */
    public String getUserPassword() {
        return userPasswordText.getText();
    }

} //--------------------------------- E O F -----------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -