SWING / CATATAN</>↗Swing16 Okt 2010
In this example you will learn how to use JTabbedPane to arrange some components in tabbed view. The JTabbedPane component of the Swing API allows some components such as panels to share the same view. By selecting the corresponding tab, the panel will be displayed on the user’s screen. To add tabs to the JTabbedPane […]
BASIC / CATATAN</>↗Basic15 Okt 2010
This example shows you how to use the super keyword to call a superclass constructor. The Female class constructor calls its superclass constructor and initializes its own initialization parameters. The call to the superclass constructor must be done in the first line of the constructor in the subclass. package org.kodejava.example.fundamental; public class Human { private […]
BASIC / CATATAN</>↗Basic15 Okt 2010
Abstract class is a class that have one or more methods declared, but not defined. Abstract class cannot have instances. This class uses in inheritance to take advantage of polymorphism. To declare that a class is abstract, use the abstract keyword in front of the class keyword in the class definition. Methods in abstract class […]
BASIC / CATATAN</>↗Basic15 Okt 2010
If a subclass has a method that have the same signature with a method in its superclass, then it’s an overriding method. Override inherited methods allow subclasses to provide specialized implementation for those methods. The overriding method has the same name, number and type of arguments, and return value as the method it overrides. The […]
BASIC / CATATAN</>↗Basic15 Okt 2010
Variable is a field in which object store its state. It also an allocations for the placement of data in memory. When the statement of variable declaration is compiled, some bytes of memory will be allocated for the variable. The size is determined by the type of variable. One variable definition is able to store […]
BASIC / CATATAN</>↗Basic15 Okt 2010
Local variables are variables that are not fields of a class. A function or method often store its temporary state in local variables. Local variables only visible to the methods in which they are declared. Local variables must be declared and initialized before it used for the first time. Local variables will not get a […]