Home » Desktop Java » swing » JFrame

JFrame

Java JFrame Example

In this article, we will see a JFrame Example and we will discuss some of JFrame main methods. We will also see how JFrame and other main classes like JPanel, JLabel, and JButton fit into the Swing hierarchy. We will then create a simple GUI using the javax.swing package. 1. Introduction JFC (Java foundation classes) encompasses a group of features ...

Read More »

Center JFrame/JWindow/JDialog on screen

In this example we shall show you how to center JFrame, JWindow, JDialog components in a Java Desktop Application. You can use this when you want to center you windows in your application automatically. For example, if your application has to handle many windows, you might want to add a button that centers the components you want. Basically, all you ...

Read More »

Create JFrame window with mouse event handling

This is an example that demonstrates how to create a JFrame windows that supports mouse event handling. This is very useful in most GUI applications because most of the time it is very efficient for the user to provide input using his mouse. Additionally, you can make your application behave accordingly to mouse movement and generally to mouse events. Basically ...

Read More »

Create JFrame window with window close event

This is an example on how to create a JFrame window with window close event. Pairing a window with a closing event is a very common practice in most GUI applications. When the user closes a window, it usually means that you have to release several resources or event exit the application. The basic steps to create a JFrame with ...

Read More »

Create JFrame Window

In this tutorial we are going to see how to create a JFrame window. The JFrame window is the single most important component in a Java Desktop Application. It’s the basic platform in wich you organize all of the application’s components and features. Basically you build your application around it. It is very simple to create a JFrame window as ...

Read More »