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</>
Swing12 Nov 2010

How do I select all text in JTextArea?

Selecting all text in the JTextArea component can be done by using the selectAll() method. In the example below we use a button action to do the selection. After select the text we transfer focus back to the JTextArea so that the highlighted text is shown. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class TextAreaSelectAll […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing12 Nov 2010

How do I append text to JTextArea?

To append text to the end of the JTextArea document we can use the append(String str) method. This method does nothing if the document is null or the string is null or empty. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class TextAreaAppendText extends JPanel { public TextAreaAppendText() { initializeUI(); } public static void showFrame() { […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing12 Nov 2010

How do I insert a text in a specified position in JTextArea?

The insert(String str, int pos) of the JTextArea allows us to insert a text at the specified position. In the example below we insert brown and over words into the current JTextArea text. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class TextAreaInsertText extends JPanel { public TextAreaInsertText() { initializeUI(); } public static void showFrame() { […]

Wayan · 1 menit baca
SWING / CATATAN</>
Swing12 Nov 2010

How do I replace text in the JTextArea?

In this example you’ll see how to use the replaceRange(String str, int start, int end) method to replace a string in the JTextArea from the start position to the end position with the specified string. package org.kodejava.swing; import javax.swing.*; import java.awt.*; public class TextAreaReplaceText extends JPanel { public TextAreaReplaceText() { initializeUI(); } public static void […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API07 Nov 2010

How do I use join method to wait for threads to finish?

If you want a thread to work until another thread dies, you can join the thread onto the end of the another thread using the join() method. For example, you want thread B only work until thread A completes its work, then you want thread B to join thread A. package org.kodejava.example.lang; public class ThreadJoin […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API07 Nov 2010

How do I set the priority of a thread?

Threads always run with some priority, usually represented as a number between 1 and 10 (although in some cases the range is less than 10). A thread gets a default priority that is the priority of the thread of execution that creates it. But, you can also set a thread’s priority directly by calling the […]

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.