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</>
Swing31 Des 2008

How do I listen for changes to the selected item in JComboBox?

This example demonstrates the ItemListener to listen for changes to the selected item in the JComboBox component. package org.kodejava.swing; import javax.swing.*; import javax.swing.border.BevelBorder; import java.awt.event.ItemEvent; import java.awt.*; public class ComboBoxSelectionChange extends JFrame { public ComboBoxSelectionChange() { initialize(); } public static void main(String[] args) { SwingUtilities.invokeLater( () -> new ComboBoxSelectionChange().setVisible(true...

Wayan · 2 menit baca
SWING / CATATAN</>
Swing28 Des 2008

How do I change the number of visible items in JComboBox?

In this example you’ll see how we can change the default number of visible items in the combo box. By default, it only shows eight items at once and when the combo box has more items a scrollbar will be shown, so we can scroll up and down in the combo box list. If we […]

Wayan · 2 menit baca
ITEXT PDF / CATATAN</>
iText PDF27 Des 2008

How do I create a table in PDF document in iText?

This example shows how to create a table in a PDF document. Using the iText PDF library we can use the PdfPTable and the PdfPCell classes to create table and cells in our PDF document. In the following example we use array of strings to define the table’s data. Let’s see the complete code snippet […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing27 Des 2008

How do I add items and remove items from JComboBox?

This example demonstrate how to add an items into a specific position in the combo box list or at the end of the list using the insertItemAt(Object o, int index) and addItem(Object o) method. In the code we also learn how to remove one or all items from the list using removeItemAt(int index) method and […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing23 Des 2008

How do I get items of JComboBox?

This example demonstrate the use of JComboBox‘s getItemCount() method and getItemAt(int index) to get the number of items inside the combo box and how to obtain each of them. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class ComboBoxGetItems extends JFrame { public ComboBoxGetItems() { initialize(); } public static void main(String[] args) { SwingUtilities.invokeLater(() -> new […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing19 Des 2008

How do I set and get the selected item in JComboBox?

The code below demonstrate how to set the selected item of JComboBox and then on how to get the value of the selected item. In this example we set the JComboBox component so that user can enter their own value. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class ComboBoxSelectedItem extends JFrame { public ComboBoxSelectedItem() { […]

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.