AWT
How do I turn on the Scroll Lock button?
The program below show you how to turn on the Scroll Lock button programmatically. Setting the locking state to Boolean.TRUE activate the Scroll Lock. package org.kodejava.awt; import java.awt.*; import java.awt.event.KeyEvent; public class TurnScrollLockOn { public static void main(String[] args) { // Gets the default toolkit. Toolkit toolkit = Toolkit.getDefaultToolkit(); // Update the locking state for […]
Article by Wayan · Source: Kode Java ↗
The program below show you how to turn on the Scroll Lock button programmatically. Setting the locking state to Boolean.TRUE activate the Scroll Lock.
package org.kodejava.awt;
import java.awt.*;
import java.awt.event.KeyEvent;
public class TurnScrollLockOn {
public static void main(String[] args) {
// Gets the default toolkit.
Toolkit toolkit = Toolkit.getDefaultToolkit();
// Update the locking state for scroll lock button to true
// will turn the scroll lock on.
toolkit.setLockingKeyState(KeyEvent.VK_SCROLL_LOCK, Boolean.TRUE);
}
}
Comments 0
Share your questions, experiences, or feedback about this article.
Sign in with Google to leave a comment.
Sign in with Google
No comments yet. Be the first to share your feedback.