Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9325227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:47:08+00:00 2026-06-19T04:47:08+00:00

I already have a inventory system which accesses a certain table on a certain

  • 0

I already have a inventory system which accesses a certain table on a certain database.

Now I want to create a new frame that will serve as a login form before the user can proceed to the main inventory system frame.

I want it to access the same database but different table, (ex. user_table and item_table under the inventory_system_db database).

If the user logged on an admin account then he can access the inventory system with admin controls (ex. edit, add, delete).

And when he logged on as a normal user he will be able to access the inventory system but without admin controls.

Things I want to know:

  • How to create a login form?
  • How to make it proceed to inventory system?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T04:47:09+00:00Added an answer on June 19, 2026 at 4:47 am

    If you want a Login Dialog just check the code below.

     public class LoginPane extends JDialog implements ActionListener {
      String itsUsername = "";
      String itsPassword = "";
      boolean itsFirst = true;
      boolean itsKeep = false;
      JTextField itsUserField = new JTextField(15);
      JPasswordField itsPassField = new JPasswordField(15);
      JCheckBox itsKeepBox = new JCheckBox("Save details:", false);
      boolean itsInit = false;
    
      public LoginPane() {
        super();
    setTitle("Login");
    setModal(true);
    getContentPane().setLayout(new GridLayout(3, 2));
    getContentPane().add(new JLabel("Username:"));
    getContentPane().add(itsUserField);
    getContentPane().add(new JLabel("Password"));
    getContentPane().add(itsPassField);
    getContentPane().add(itsKeepBox);
    JButton submit = new JButton("done");
    getContentPane().add(submit);
    submit.addActionListener(this);
    pack();
     }
    
    public String[] getLogin() {
    if (!itsKeep && !itsFirst) {
      return null;
    }
    if (!itsInit) {
      return null;
    }
    itsFirst = false;
    String[] res = new String[2];
    res[0] = itsUsername;
    res[1] = itsPassword;
    if (!itsKeep) {
      itsUsername = "";
      itsPassword = "";
    }
    return res;
      }
    
      public void actionPerformed(ActionEvent e) {
    itsUsername = itsUserField.getText();
    itsPassword = new String(itsPassField.getPassword());
    itsKeep = itsKeepBox.isSelected();
    itsInit = true;
    setVisible(false);
    }
    }
    

    You can add action for button as you wish!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We already have the database with real data inside. Now we want to build
I already have code which lazy loads scripts on request. My issue now is
I already have an application built in asp.net 3.5 and now I want to
In our inventory database (SQL Server 2008 std edition) we have a table (called
We already have a good build server in Hudson but we want something that
i already have a project with TreeNode class which creates a hierachy of nodes
I already have an enterprise Java EE application. I want expose some of the
I already have Java code to display and process data from a database. I
We already have a table of all referral of a website: ( one entry
I already have installed Java SDK following which, I later also Downloaded Java EE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.