Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

SWING / CATATAN</>
Swing03 Agt 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 menit baca
SWING / CATATAN</>
Swing02 Agt 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 menit baca
SWING / CATATAN</>
Swing01 Agt 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 menit baca
SWING / CATATAN</>
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 menit baca
SWING / CATATAN</>
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 menit baca
SWING / CATATAN</>
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 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.