Question: I am making a virtual keyboard in java eclipse / scene builder and am attempting to get letter and number keys to play audio of
I am making a virtual keyboard in java eclipsescene builder and am attempting to get letter and number keys to play audio of what key is pressed. I.e when you press A it plays a sound file saying A Attached is a part of the code I have currently have, using the A button as an example. I already have and am planning on using wav audio files. Any help to get this working would be much appreciated.
import java.ioFileWriter;
import java.ioIOException;
import javafx.event.ActionEvent;
import javafx.fxmlFXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.ToggleButton;
import javafx.scene.shape.Circle;
public class VirtualKeyboardController
private boolean shiftPressedLeft false;
private boolean shiftPressedRight false;
private boolean capsLockOn false;
@FXML
private TextArea textArea;
@FXML
private ToggleButton shiftLeft;
@FXML
private ToggleButton shiftRight;
@FXML
private Circle capslockLed;
@FXML
private Button buttonPressFunction;
@FXML
private Button buttonPressFunction;
@FXML
void buttonPressAActionEvent event
placeTexta;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
