What Is JFrame in Java Swing? Creating and Using Windows
JFrame is the top-level window of a Swing application. See how to create it safely on the EDT, lay out components, handle events and choose a close operation.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
JFrame is the top-level window of a Swing application. See how to create it safely on the EDT, lay out components, handle events and choose a close operation.
Swing is built from components, containers, layout managers, events and a pluggable look and feel. See a complete runnable example.
Build a Java Swing window with JFrame, layout managers, buttons and listeners, and learn why UI code must run on the Event Dispatch Thread.
java.awt provides windows, layout managers, events and 2D graphics. Learn what it contains, how it relates to Swing, and where it is still used.
The Java Plugin ran applets in browsers and is now obsolete. See its purpose, the decline timeline and what replaced it.
An application starts at main and runs standalone; an applet was a browser plug-in program. Learn the differences and why applets are obsolete.
Java applets cannot run in modern browsers and the Applet API is gone from the JDK. Learn what applets were, why they ended and how to build a Swing app instead.
Java applets ran inside browsers through a plug-in and are now removed from the JDK. See the lifecycle, an example, and the modern replacements.
The SecurityManager is permanently disabled in Java 24, so policy files no longer sandbox code. Use Permission-based checks and OS-level isolation instead.
SecurityManager enforced a permission policy for sensitive operations. It is deprecated for removal and cannot be enabled since Java 24.
JMX is the standard Java API for monitoring and managing a running JVM through MBeans. Build one, view it in JConsole and secure remote access.
Dynamic proxies generate interface implementations at runtime and route every call to one handler. See a working example, use cases and limits.
Use Proxy.newProxyInstance with an InvocationHandler to intercept calls to any interface. Includes a working logging example and common pitfalls.
The Java ClassLoader loads class bytes into the JVM and defines which classes code can see. Learn the built-in loaders, parent delegation and how to write a custom one.
Find a Method with getMethod or getDeclaredMethod and call invoke(instance, args). Covers static, private and varargs methods, exceptions and MethodHandle.
Reflection lets Java code inspect and use classes at runtime. Learn Class objects, invoking methods, reading annotations, module restrictions and faster alternatives.
Style JavaFX buttons, text fields and tables with -fx- CSS properties, style classes, pseudo-classes and theme colors defined on the root node.
JavaFX CSS styles nodes with -fx- properties, style classes, and pseudo-classes. See how to load stylesheets, build themes, and avoid common mistakes.
Register JavaFX event handlers with setOnAction or addEventHandler, understand filters and bubbling, and handle keyboard, mouse and window events correctly.
SceneBuilder is a drag and drop designer that writes FXML for JavaFX apps. See how it separates UI from logic, with a complete controller and loader example.