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.

CORE API / CATATAN</>
Core API22 Okt 2009

How do I iterate LinkedList elements using ListIterator?

This example show you how to use the ListIterator interface to iterate elements of a LinkedList. package org.kodejava.util; import java.util.List; import java.util.LinkedList; import java.util.ListIterator; public class LinkedListListIterator { public static void main(String[] args) { List<String> grades = new LinkedList<>(); grades.add("A"); grades.add("B"); grades.add("C"); grades.add("D"); grades.add("E"); // Retrieves object from LinkedList using the ListIterator // inter...

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API18 Okt 2009

How do I iterate LinkedList elements using Iterator?

This example show you how to use the Iterator interface to iterate elements of a LinkedList. package org.kodejava.util; import java.util.List; import java.util.LinkedList; import java.util.Iterator; public class LinkedListIterator { public static void main(String[] args) { List<String> grades = new LinkedList<>(); grades.add("A"); grades.add("B"); grades.add("C"); grades.add("D"); grades.add("E"); // Iterates elements in LinkedList using Iterator. Iterator<String> iterator =...

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API14 Okt 2009

How do I create a LinkedList?

A linked list is a fundamental data structure in programming. It can store data and a references to the next and/or to the previous node. There can be a singly linked list, a doubly linked list and a circularly linked list. The code below show you how to use the java.util.LinkedList class to create a […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing11 Okt 2009

How do I add selection listener to JTree?

This example shows you how to use the TreeSelectionListener to add a tree selection listener to the JTree component. In the listener method below you can see how to get the selected path and print out the selected path to the console. package org.kodejava.swing; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreePath; import java.awt.*; public class JTreeSelectionListenerDemo […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing07 Okt 2009

How do I change color of selected node in JTree?

This example show you how to change the color of the selected node of the JTree component. It shows you how to set the node background color, the font color and the selected node border color. To do this you need to obtain the DefaultTreeCellRenderer object from the JTree instance and modified the selection color […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing03 Okt 2009

How do I use a JTree component?

The example introduce you how to use the JTree swing component to create a presentation of hierarchical data. The hierarchical data can be viewed in expand mode or collapse mode. To create an item of the tree we create an instance of DefaultMutableTreeNode which located in the javax.swing.tree package. This class implements the TreeNode and […]

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