SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

SWING / NOTES</>↗
Swing03 Aug 2007

How do I get the system look and feel?

The UIManager.getSystemLookAndFeelClassName() method returns the current system LAF (Look and Feel) for Swing application. Do not forget to call the SwingUtilities.updateComponentTreeUI() method after setting the LAF to update the current application look and feel. package org.kodejava.swing; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.WindowConstants; public class SystemLAFDemo { public static void main(Strin...

Wayan · 1 min read
SWING / NOTES</>↗
Swing02 Aug 2007

How do I set the look and feel for Swing application?

package org.kodejava.swing; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.WindowConstants; import java.awt.FlowLayout; public class LookAndFeelDemo extends JFrame { public LookAndFeelDemo() { initComponents(); } public static void main(String[] args) { SwingUtilities.invokeLater(() -> new LookAndFeelD...

Wayan · 2 min read
SWING / NOTES</>↗
Swing01 Aug 2007

How do I get the available Swing look and feel?

The code snippet below describe how we can obtain the available look and feel in the current Swing platform. This information can then be made available to the user, so they can change to look and feel of the application in their preferences. package org.kodejava.swing; import javax.swing.UIManager; public class AvailableLookAndFeel { public static void main(String[] […]

Wayan · 1 min read
SWING / NOTES</>↗
Swing31 Jul 2007

How do I format JTextField text to uppercase?

To change JTextField text to upper case can be easily done by adding a DocumentFilter to the JTextField component using the setDocumentFilter() method. The DocumentFilter allow us to filter action for changes in the document such as insert, replace and remove. The code snippet below show us how to do it. package org.kodejava.swing; import javax.swing.JFrame; […]

Wayan · 2 min read
SWING / NOTES</>↗
Swing29 Jul 2007

How do I add key listener event handler to JTextField?

In this small Swing code snippet we demonstrate how to use java.awt.event.KeyAdapter abstract class to handle keyboard event for the JTextField component. The snippet will change the characters typed in the JTextField component to uppercase. A better approach for this use case is to use the DocumentFilter class. See the following code snippet How do […]

Wayan · 2 min read
SWING / NOTES</>↗
Swing26 Jul 2007

How do I change JFrame image icon?

This code snippet demonstrates how to change a JFrame image icon using the setIconImage() method. package org.kodejava.swing; import javax.imageio.ImageIO; import javax.swing.JFrame; import javax.swing.WindowConstants; import java.awt.Dimension; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.URL; public class FrameIconExample extends JFrame { public static void main(String[] args) { FrameIconExample frame = new FrameIconExample(); frame.setDe...

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.