SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

JDBC / NOTES</>↗
JDBC13 Feb 2008

How do I get JDBC driver information?

JDBC stands for Java Database Connectivity. It is an API (Application Programming Interface) in Java that allows Java applications to interact with databases. JDBC provides a set of interfaces and classes for connecting to a database, executing SQL queries, and retrieving results. It is part of the Java Standard Edition platform and is designed to […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API09 Feb 2008

How do I get currency symbol?

package org.kodejava.util; import java.util.Currency; import java.util.Locale; public class CurrencySymbol { public static void main(String[] args) { Currency currency = Currency.getInstance(Locale.JAPAN); System.out.println("Japan = " + currency.getSymbol()); currency = Currency.getInstance(Locale.UK); System.out.println("UK = " + currency.getSymbol()); currency = Currency.getInstance(Locale.US); System.out.println("US = " + currency.getSymbol()); currency = Currency.getInst...

Wayan · 1 min read
AWT / NOTES</>↗
AWT06 Feb 2008

How do I create mouse event using Robot class?

In this example we are automating the process of creating mouse event using the java.awt.Robot class. package org.kodejava.awt; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.InputEvent; public class MovingMouseDemo { public static void main(String[] args) { try { Robot robot = new Robot(); // Move mouse cursor to 200, 500 robot.mouseMove(200, 500); // Press the mouse button […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT05 Feb 2008

How do I get the color of a screen pixel?

The example here show us how to get the color of a pixel in the screen. We use the Robot.getPixelColor(int x, int y) method to obtain the Color of the pixel. package org.kodejava.awt; import java.awt.Color; import java.awt.Robot; import java.awt.AWTException; public class ColorPickerDemo { public static void main(String[] args) { try { Robot robot = new […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT04 Feb 2008

How do I create key press event using Robot class?

In this example we use the java.awt.Robot class to generate a key press event. We can call the keyPress(int keyCode) method to produce this event. package org.kodejava.awt; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; public class CreatingKeyboardEvent { public static void main(String[] args) { try { Robot robot = new Robot(); // Create a three seconds […]

Wayan · 1 min read
AWT / NOTES</>↗
AWT04 Feb 2008

How do I create a screen capture using Robot class?

In this example you’ll see how to create a screen capture / screenshot and save it as an image file such a PNG image. Some classes are use in this program including the java.awt.Robot, java.awt.image.BufferedImage and javax.imageio.ImageIO. package org.kodejava.awt; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.awt.AWTException; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Robot; import java.io.File; import java.io.IOE...

Wayan · 1 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.