473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

JOptionPane and KeyListener / keyPress???

I have changed my code since the last question. I get a dialog box and ShowDialogMessage popups. I have a loop that runs to take user input and does a calculation. While running the loop, It di=oesn't detect the keypressed or keyReleased , however if I run the program without the loop, it detects the keypressed and keyReleased and ends the program properly.I need to be pointed in the right direction so that intries in the popup boxes are handled properly. Attached is the code if you are curious and might be able to assist me.
Attached Files
File Type: docx keylistenertest.docx (14.7 KB, 90 views)
May 2 '20 #1
1 1923
dev7060
636 Expert 512MB
Post the code here. It says server problem while downloading the attachment on chrome android.
May 4 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: - Steve - | last post by:
Example String testString = "Testing \t tabs"; JOptionPane.showMessageDialog(null, testString, "TEST", JOptionPane.INFORMATION_MESSAGE); Instead of getting the output "Testing tabs", I...
1
by: jazzy | last post by:
Hi, I am new to Java Programming and I am trying to write code using JOption pane to prompt user to type information and then have string output command to display information on the screen. I...
3
by: heat84 | last post by:
I want to customise JOptionPane and add a KeyListener to it. I want to behave in a certain manner when the enter key is pressed , but from the look of things, the key listener I am adding to the...
1
twitch3729
by: twitch3729 | last post by:
Basicaly, I have a frame with only a Canvas on it and a KeyListener. For some reason the keyListener stops registering my keys as soon as I have moved the Window from its starting position. I have...
3
by: Humakt | last post by:
I've done KeyListener before successfully, but for some reason I can't get it to work in my recent project. Here is the code: View class (setBattleController is called upon creating new Battle...
2
mrjohn
by: mrjohn | last post by:
Hey, I'm trying to make a program that will recognize when certain keys are released, so that I can encorperate it into a game I'm making. Unfortunately, it doesn't seem to be working. When I run the...
0
by: Mark Daniel | last post by:
For some reason, my final JOptionPane.showInputDialog is throwing an error when I try to compile, and I get some errors from the ActionPerformed area with an e.getSource. it is a swing array to take...
2
by: Peter Nicholson | last post by:
Hi all, firstly please advise if I've posted incorrectly as this is my first post. Consider the following files : Grandparent - public class Parent - public abstract class extends...
1
by: dynamiser | last post by:
i was trying to use JOptionPane as the input mode to find out if the input number is prime or not.. but i am stuck with this code.. package primeNo; import java.util.Scanner; import...
0
by: LeoDurf | last post by:
package main; import java.awt.event.*; import javax.swing.*; import java.awt.*; /** * @author 16023 * */
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.