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
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

APPLET / CATATAN</>
Applet10 Apr 2010

How do I get and display an image in Applet?

To display an image in an applet we first need to obtain the image object itself. A call to applet’s getImage(URL url, String name) method help us to create an image object from the specified URL of the image. For displaying the image on the applet’s screen we draw it in the paint() method using […]

Wayan · 1 menit baca
APPLET / CATATAN</>
Applet05 Apr 2010

How do I get Applet’s document URL?

The code snippet below show you how to get the URL of the document (HTML, JSP, etc.) where the Applet is embedded. To obtain this document URL we use the getDocumentBase() method call provided by the Applet class. In the paint() method below we use the getDocumentBase() to create a URL as a link to […]

Wayan · 1 menit baca
APPLET / CATATAN</>
Applet26 Mei 2007

How do I display message in browser status bar?

In this applet example you’ll see how to display a message in browser status bar. To make the example a bit more interesting we’ll display the current time as the message. The time will be updated every on second during the lifetime of the applet. package org.kodejava.applet; import java.applet.Applet; import java.awt.Graphics; import java.text.DateFormat; import java.text.SimpleDateFormat; […]

Wayan · 2 menit baca
APPLET / CATATAN</>
Applet07 Apr 2007

How do I change an applet background color?

By default, the applet will usually have a grey background when displayed in a web browser. If you want to change it then you can call the setBackground(java.awt.Color) method and choose the color you want. Defining the background color in the init() method will change the color as soon as the applet initialized. package org.kodejava.applet; […]

Wayan · 2 menit baca
APPLET / CATATAN</>
Applet22 Mar 2007

How do I read an applet parameters?

package org.kodejava.applet; import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class AppletParameterExample extends Applet { private String name = ""; public void init() { // Here we read a parameter named name from the applet tag definition // in our html file. name = getParameter("name"); } public void paint(Graphics g) { g.setColor(Color.BLUE); g.drawString("Hello " + name […]

Wayan · 1 menit baca
APPLET / CATATAN</>
Applet20 Jan 2007

How do I create a Hello World Applet?

The code below demonstrate the very basic of Java applet. Applet is a small Java application that can be embedded on the web browser. package org.kodejava.applet; import java.applet.*; import java.awt.*; public class HelloWorldApplet extends Applet { public void init() { } public void start() { } public void stop() { } public void destroy() { […]

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.