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</>
Swing18 Jan 2009

How do I place swing component using absolute coordinates?

In this example you can see how we do an absolute positioning to a swing component in the content panel. In this example we use a JPanel as the container, and we didn’t set a layout manager into it. To position the component on the container we use the setBounds() method of the component. This […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing17 Jan 2009

How do I arrange the swing component using GridLayout?

This example use the GridLayout to create a four by four grid layout. One each of the grid we place a JTextField component to read user inputs. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class GridLayoutDemo extends JFrame { public GridLayoutDemo() { initializeUI(); } public static void main(String[] args) { SwingUtilities.invokeLater(() -> new GridLayoutDemo().setVisible(true)); } […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing13 Jan 2009

How do I arrange the swing component using FlowLayout?

In this example you can see how to arrange the swing components using the FlowLayout manager. This manager arranges the component in a directional flow based on the container component orientation such as ComponentOrientation.LEFT_TO_RIGHT and ComponentOrientation.RIGHT_TO_LEFT. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class FlowLayoutExample extends JFrame { public FlowLayoutExample() { initialize(); } public static […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing10 Jan 2009

How do I arrange the swing component using BoxLayout?

This example demonstrate how we can arrange component in row or column order using the BoxLayout layout manager. Instead of use the BoxLayout manager we can also use the Box component as our content pane to get the same effect as using the BoxLayout manager. package org.kodejava.swing; import javax.swing.*; public class BoxLayoutDemo extends JFrame { […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing08 Jan 2009

How do I determine if the menu of JComboBox is displayed?

This example show how to create an implementation of PopupMenuListener for listening to when the JComboBox menu is visible, invisible or cancelled. package org.kodejava.swing; import javax.swing.*; import javax.swing.event.PopupMenuListener; import javax.swing.event.PopupMenuEvent; import java.awt.*; public class ComboBoxPopupMenuListener extends JFrame { public ComboBoxPopupMenuListener() { initialize(); } public static void main(String[] args) { SwingUtilities.invokeLater(...

Wayan · 1 menit baca
SWING / CATATAN</>
Swing03 Jan 2009

How do I add an action listener to JComboBox?

The code below shows you how to add an ActionListener to a JComboBox component. In the snippet we add a listener by calling the addActionListener() method and give an instance of ActionListener listener as an anonymous class (a class without a specified name) as the parameter. The ActionListener interface contract said that we must implement […]

Wayan · 2 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.