I am working on a project in Java using JavaFX. The project is for a Cafe notification system that has a front end for the customers and has a front end for the cooks and I am running a dual display where one display has the user front end and another display for the cooks front end. The problem is that if there are 2 keyboards connected to the raspberry pi, both input will be in the same TextField because you can't select more than one TextField on a single machine.
What I think could work is that the keyboard for cooks is just the number pad and the users have a normal keyboard without a numberpad. So if there was a way to grab input from the numberpad (since they have different key codes then the numbers on the top of a keyboard) and enter text into the cook TextField without the window being in focus, that would solve my issue I just don't know how to go about that. The user input would just be entered normally since it will be focused on the user UI and they can click for different text fields.
Is that method possible? Is there a better method? Or is this whole thing not feasible and I should just switch to 2 separate raspberry pi's? (please see if it is possible before going straight to 2 devices)
For reference the github project is here: https://github.com/thatoneguy43/CafeBuzzerSystem
I'm hoping I didn't leave any important information out, this is my first post here. If you need any more info from me or have any questions ask away.
Related
I am programming a lottery program in JavaFX (6 numbers of a 6x7 field + 1 lucky number) which allows the user to create max 10 tips at once. Then the program evaluates if he won.
My current problem is to delete a Tip that has been added. I have a Class "Tip" which consists of an HBox with 7 labels inside (for the 7 chosen numbers) and a button to delete this Tip (so every Tip has its own delete button).
My function to add a Tip works (even though, I don't really know if this is really clean. So if you see any improvements, I'd be really thankful! :-)).
Under the following link, you can find my entire code:
https://github.com/Lucindor/Lottery.git
The main issue or part that I'm stuck is in the Controller from line 73 to 80 (deleteTip method).
My main idea was to removethe parent of the button (which should be the Tip(?)), which should have removed the entire tip...but this didn't work. I couldn't get any ideas more.
In the end, I want to be able to click on any delete button which removes this tip and moves all the tips below (So that it's like a list).
Thanks a lot!
I am working with Movilizer v15 in eclipse neon.
Currently, I am making a quiz, where people need to answer a number of questions with numeric values. But every question now consists of clicking on the answer (attributeType="2") to open the numeric keyboard, followed by answering, closing it again and pressing ok. This get's very tedious after a while.
So my question: Is there a way I can bypass opening the keyboard or having to click twice to move on to the next screen?
You can focus an Answer in the onEnterAssignment of a Question. If that Answer is of attributeType="2" this should open the numeric keyboard of the platform right away. If that keyboard allows "tabbing" forward, you can move from input field to input field. I think on Android the standard keyboard can do that.
focus(answ-desc answer, str clientKey)
Limitations might be
input fields across complex UIs
triggering OK event after the last input field is left
I am just learning AWT / Swift / JavaFx recently and I feel like I have learned a lot but have barely scratched the surface. There might be a much easier way to do this BUT, I am trying to make a GUI button in eclipse that calculates the distance between two objects that the user creates. Lets call them Robots for now. So, I have one button that allows the user to create the Robots and it stores them in a DefaultListModel (listModel) and displays them in a Jlist (list) below the buttons. When the user then clicks on a robot, another button becomes actice and allows them to calculate the distance between them (one of the parameters of the robots is their location on a grid). I have all that worked out but my problem is that I am trying to make it to where they have to select two different Robots. At first I thought I could let them select two Robots and then make the computeDistance button becomes active, but I am not really sure how to do that because the only way I can select more than one object in the JList is to cntrl click and I don't want the user to have to know that trick.
My next idea was to allow the user to have one Robot selected and then give them a popup window displaying the other Robots and have them select one. Via showOptionsDialog, I have discovered how to make a custom JOptionPane, so I thought, why not make them buttons (probably will look awful, but I don't know how to make anything other than JOptionPane.showXxx at this point (like I said, only skin deep so far). Have tried consulting the javadocs, but right now that is a LOTTT to take in and have read a decent amount, I thought.
Ok, sorry if this is long, but is there a way, using my DefaultListMethod to make custom buttons? I tried a bunch of ways by creating Object[] options = {list.elements()}; etc but that doesn't work. Any help would be much appreciated!
Not sure if I'm asking this question on the correct site (I have been wondering if this should rather be posted on the EE.stackoverflow site).
So I have an OLD serial input mouse, and I want the system to reprogram or retranslate it to a keyboard button-press.
The whole thing is that I have software with shortcut keys, but remembering all of them is just not possible. So, why does one want to have a whole keyboard when one can only have a set of three buttons? Using a keyboard, when one presses F11 (and holds it in), it activates the system's mic. While holding in F11, one wants to press F1 to start playing music, thus being a voice over song application.
I've been trying to research the possibility, and I've come to notice that there are a LOT of applications that can convert a USB device, such as a game controller to a keyboard button-press. That's what's driving my concept.
Is this even possible?
Thanks,
Johan Brink
Well, as described here, if you are using Windows, you can use X-Mouse Button Control for mouse. If you want to use gamepad, try J2K - A Joystick to Keyboard Mapper 1.1
Have a look on Makey Makey (www.makeymakey.com). This is a board which emulates a key stroke each time one of his input is closed.
I am a computer science student doing my first project on the side. I deliver pizza so i figured I would make a program that aids delivery drivers. I am just starting on it today.
Here is a pic:
Right now, you have to press enter after typing in a value in any of the boxes. I want to make it where the value under hourly earnings autoupdates when tips and hours worked boxes have numbers in them. With no need to press enter.
Use DocumentListener for your textfields and update the appropriate JLabel in your Listener implementation.
Depending on when you want the update to occur, you could (as has been suggested) a DocumentListener, which will allow updates in real time (as you type) or if you just want the values to change when you move to the next field (ie tab or click), you could use a FocusListener