Home » Archives for Byron Kiourtzoglou » Page 9

Author Archives: Byron Kiourtzoglou

Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.

Simple key press listener

With this simple tutorial we are going to see how to implement a simple key listener for your Java Desktop Application. This is a very nice tool if your application offers rich keyboard activity to the user. In short, in order to implement a simple key listener in Java, one should perform these steps: Create a new class that extends ...

Read More »

Activate a Keystroke when the window has focus

With this tutorial we shall show you how to activate a Keystroke when on of the window of out application gains focus. This is very simple and to do it you have to follows these steps: Create a class that extends AbstractAction. You can bind this action with a certain keystroke if you want. Create an input device like a ...

Read More »

A complete Key Event example

With example we shall show you how to create a simple application that can handle all key events. This is very useful when your application gets lots of keyboard input form the user. In short, all you have to do in order to construct a simple application that demonstrates all key events is: Create a class that implements ActionListener and ...

Read More »

KeyListener example

In this example we are going to see how you can use a KeyListener in Java, in order to monitor key events that take place in your applications. This is particularly useful when you want to add some key functionality to your app and it’s very important you want to monitor that has a very intensive keyboard activity. Basically, to use a KeyListener in ...

Read More »

Handle mouse clicks example

In this short tutorial we are going to see how to monitor a very basic GUI event in Java Desktop Applications, which is mouse clicks. What we want to see is what button mouse the user pressed (left, middle or right click) and then we want to know the exact location, in coordinates, in our Frame that this event occurred. ...

Read More »

Handle focus changes example

In this tutorial we are going to see how to handle focus changed in a Java Desktop Application. You might find this particularly useful if you have an application that contains many objects and you want to monitor the focus changes over these objects, if you always want to know the object that the user interacts with. You can use ...

Read More »

Determine click count example

With this tutorial we are going to see how can you determine the number of clicks that a user performed over an object in a Java Desktop application. This is very useful when you want the user to have rich interaction with your application using his mouse. You can also add extra functionality according to how many clicks the user did ...

Read More »

Getting and setting text on the system clipboard

With this example we are going to see how to get and set the text on the system clipboard. This is a very common feature that we all use every day when working on a computer. The most common use of this is when we perform text copy/paste operations. Using this example you can embed this operations in you own ...

Read More »

Setting the initial focus component in a Window

With this example we shall show you how to set the component that gets the focus when your application starts up. This is very useful when you have many graphical objects firing up at the start up of your application. Let’s see the code snippet that follows and it should be pretty clear:           package com.javacodegeeks.snippets.desktop; ...

Read More »

Hide Frame when closed example

With this example we are going to see how to hide a closed frame. To do that all you have to do is: Create a new WindowAdapter instance. Override windowClosing method. Now every time a the window closes this method will fire up. Use Frame.setVisible(false) to hide the frame you want.       Let’s see the code: package com.javacodegeeks.snippets.desktop; ...

Read More »