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 8318511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:00:06+00:00 2026-06-08T22:00:06+00:00

We have built a Point of Sale system and now we require to implement

  • 0

We have built a Point of Sale system and now we require to implement it to Touch screens? Do we need to change any code in turn to allow this to work.

And we are using the Keyboard to enter values – let’s say quantity – Is there a java way of popping up a key board (like android) when I focus on a JTextField?

  • 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-08T22:00:09+00:00Added an answer on June 8, 2026 at 10:00 pm

    Here is a simple example on how to implement a pop-up keyboard:

    enter image description here

    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.Font;
    import java.awt.GridLayout;
    import java.awt.Point;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    
    
    @SuppressWarnings("serial")
    public class MainFrame extends JFrame
    {
        private JTextField txt;
        private PopUpKeyboard keyboard;
    
        public MainFrame()
        {
            super("pop-up keyboard");
            setDefaultCloseOperation(EXIT_ON_CLOSE);
    
            txt = new JTextField(20);
            keyboard = new PopUpKeyboard(txt);
    
            txt.addMouseListener(new MouseAdapter()
            {
                @Override
                public void mouseClicked(MouseEvent e)
                {
                    Point p = txt.getLocationOnScreen();
                    p.y += 30;
                    keyboard.setLocation(p);
                    keyboard.setVisible(true);
                }
            });
            setLayout(new FlowLayout());
            add(txt);
    
            pack();
            setLocationByPlatform(true);
        }
    
        public static void main(String[] args)
        {
            SwingUtilities.invokeLater(new Runnable()
            {
                @Override
                public void run()
                {
                    new MainFrame().setVisible(true);
                }
            });
        }
    
        private class PopUpKeyboard extends JDialog implements ActionListener
        {
            private JTextField txt;
    
            public PopUpKeyboard(JTextField txt)
            {
                this.txt = txt;
                setLayout(new GridLayout(3, 3));
                for(int i = 1; i <= 9; i++) createButton(Integer.toString(i));
                pack();
            }
    
            private void createButton(String label)
            {
                JButton btn = new JButton(label);
                btn.addActionListener(this);
                btn.setFocusPainted(false);
                btn.setPreferredSize(new Dimension(100, 100));
                Font font = btn.getFont();
                float size = font.getSize() + 15.0f;
                btn.setFont(font.deriveFont(size));
                add(btn);
            }
    
            @Override
            public void actionPerformed(ActionEvent e)
            {
                String actionCommand = e.getActionCommand();
                txt.setText(txt.getText() + actionCommand);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have built a Point of Sale which is works great. I have already
I have built a C#.NET WinForms App. I now need to build a MSI
I have built a site which requires user to login. Now I have decided
I have built ffmpeg for Android using the code and method described at https://github.com/halfninja/android-ffmpeg-x264
Our company has a point of sale system with many extras, such as ordering
I have 2 arrays of objects in a e-commerce project (built in Code Igniter),
In my interpreter I have built-in functions available in the language like print exit
When you define an extension-point in an Ant build file you can have it
I am starting to build my first Android app. I have reached the point
I have built so far an application that allows the user to drag and

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.