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</>
Swing01 Okt 2008

How do I get the JFrame of a component?

This code snippet gives an example on how to get the JFrame of a component. In this example we try to get the JFrame from a button action listener event. To get the JFrame we utilize the SwingUtilities.getRoot() method and this will return the root component of the component tree in out small program below […]

Wayan · 2 menit baca
SWING / CATATAN</>
Swing30 Sep 2008

How do I disable JFrame close button?

To disable the close operation on a JFrame, when user click the close icon on the JFrame, we can set the value of the default close operation to WindowConstants.DO_NOTHING_ON_CLOSE. package org.kodejava.swing; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.HeadlessException; public class DisableCloseButtonDemo extends JFrame { p...

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API28 Sep 2008

How do I get the path from where a class is loaded?

This examples shows how to get a path name or location from where our class is loaded. package org.kodejava.lang; public class CodeSourceLocation { public static void main(String[] args) { CodeSourceLocation csl = new CodeSourceLocation(); csl.getCodeSourceLocation(); } private void getCodeSourceLocation() { // The location from where the class is loaded. System.out.println("Code source location: " + getClass().getProtectionDomain().getCodeSource().getLocation()); […]

Wayan · 1 menit baca
CORE API / CATATAN</>
Core API25 Sep 2008

How do I validate email address using regular expression?

In this example we use the String‘s class matches() methods to match a string to be a valid email address based on the given regex. This example also demonstrate the power of regular expression to validate an email address. Using regular expression makes it easier to validate data such as email address. After the code […]

Wayan · 2 menit baca
JSP / CATATAN</>
JSP24 Sep 2008

How do I include a page fragment into JSP?

In this example you can learn how to include a JSP fragment into another JSP page. This is a common practice when creating a web application where we usually have a navigation section, the main content and the footer of a web page. Using the include directive make it simpler to maintain the fragment of […]

Wayan · 2 menit baca
SERVLET / CATATAN</>
Servlet22 Sep 2008

How do I define welcome files for web application?

The configuration below gives us example how to define a welcome-files to our web application. The welcome file is default file to be loaded by a servlet container when we access a URL without telling which page to load. <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> <welcome-file-list> <welcome-fi...

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.