<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title> &#187; API</title>
	<atom:link href="http://www.andisun.com/tag/api/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andisun.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Aug 2010 03:28:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>User Interface pada J2ME</title>
		<link>http://www.andisun.com/tutorials/j2me-programming/user-interface-pada-j2me</link>
		<comments>http://www.andisun.com/tutorials/j2me-programming/user-interface-pada-j2me#comments</comments>
		<pubDate>Thu, 23 Jul 2009 03:43:38 +0000</pubDate>
		<dc:creator>myandisun</dc:creator>
				<category><![CDATA[J2ME-Mobile Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[High]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[J2ME]]></category>

		<guid isPermaLink="false">http://www.andisun.com/?p=256</guid>
		<description><![CDATA[Satu hal terpenting dalam sebuah aplikasi adalah Graphical User Interface (GUI). GUI dapat dimanfaatkan sebagai media input dalam sebuah aplikasi. Class-class untuk membangun GUI dalam MIDP disimpan dalam lcdui (javax.microedition.lcdui), sehingga agar dapat memanfaatkan class tersebut dengan mengimport paketnya. Struktur GUI dalam MIDP GUI di dalam MIDP dibagi menjadi dua bagian, yaitu: high-level API (yang [...]]]></description>
			<content:encoded><![CDATA[<p>Satu hal terpenting dalam sebuah aplikasi adalah <em>Graphical User Interface (GUI)</em>. GUI dapat dimanfaatkan sebagai media input dalam sebuah aplikasi.</p>
<p><em>Class-class</em> untuk membangun GUI dalam MIDP disimpan dalam lcdui (<span style="font-family: courier new,courier;">javax.microedition.lcdui</span>), sehingga agar dapat memanfaatkan class tersebut dengan mengimport paketnya.</p>
<p><strong>Struktur GUI dalam MIDP</strong></p>
<p>GUI di dalam MIDP dibagi menjadi dua bagian, yaitu: <em>high-level API</em> (yang didasarkan pada penbentukan window) dan <em>low-level API</em> (yang didasarkan pada pembentukan canvas dan pixel). Penggunaan <em>high-level API</em> lebih mudah disbanding mengunakan <em>low-level API</em> untuk membangun sebuah interface pada suatu aplikasi. Namun dengan menggunakan <em>low level API</em> lebih leluasa dalam mendesain sebuah interface.</p>
<p>Model high-level API menyediakan class-class standar yang digunakan untuk membangun UI <em>(User Interface)</em> seperti component <span style="font-family: courier new,courier;">Form, TextBox, List, Alert</span>. Model High-level mengimplementasikan class-class yang diturunkan dari class Screen.</p>
<p>Model Low-level API memberikan akses yang kepada programmer untuk melakukan control terhadap tampilan layer, termasuk pengembaran menggunakan pixel, pembentukan bentuk geometri (segitiga, segiempat,lingkaran,elips, arc, dll). Model ini sering digunakan untuk membuat game. Karena model ini dapat membuat bentuk tek graphic yang lebih spesifik sesaui dengan keinginan. Model ini juga dapat membaca tombol-tombol yang ditekan oleh user.</p>
<p>Dalam paket lcdui yang dimport menggunakan:</p>
<p style="padding-left: 30px;"><span style="font-family: terminal,monaco;">import javax.microedition.lcdui.*;</span></p>
<p>Paket ini terdiri dari interface dan class.</p>
<p>Tabel daftar interface:</p>
<table style="width: 599px; height: 120px;" border="0" cellspacing="1" cellpadding="2">
<tbody>
<tr>
<td width="157"><strong>Interface</strong></td>
<td width="424"><strong>Keterangan</strong></td>
</tr>
<tr>
<td width="157"><span style="font-family: courier new,courier;">Choice</span></td>
<td width="424">Mengimplementasikan sejumah item pilihan yang   didefinisikan.</td>
</tr>
<tr>
<td width="157"><span style="font-family: courier new,courier;">CommandListener</span></td>
<td width="424">Menerima <em>event-event</em> level tinggi.</td>
</tr>
<tr>
<td width="157"><span style="font-family: courier new,courier;">ItemStateListener</span></td>
<td width="424">Menerima <em>event</em> yang mengindikasikan perubahan keadaan dari item yang terdapat pada obyek Form</td>
</tr>
</tbody>
</table>
<p><span id="more-256"></span></p>
<p>Daftar kelas paket lcdui:</p>
<table style="width: 596px; height: 613px;" border="0" cellspacing="1" cellpadding="2">
<tbody>
<tr>
<td width="118"><strong>Class</strong></td>
<td width="464"><strong>Keterangan</strong></td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Alert</span></td>
<td width="464">Menampilkan pesan ke user untuk periode waktu tertentu</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">AlertType</span></td>
<td width="464">Mendefinisikan tipe objek Alert yang akan ditampilkan</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Canvas</span></td>
<td width="464">Class yang digunakan untuk aplikasi yang membutuhkan   event-event rendah seperti game dan untuk mengambar dilayar.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">ChoiceGroup</span></td>
<td width="464">Meyajikan sekumpulan elemen yang dapat dipilih yang   dimasukkan di dalam Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Command</span></td>
<td width="464">Konstruksi yang mebungkus informasi-informasi yang   dilakukan oleh user.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">CustomItem</span></td>
<td width="464">Membuat   elemen user interface baru yang ditempatkan pada sebuah Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">DateField</span></td>
<td width="464">Komponen yang   digunakan untuk menampilkan tanggal dan waktu.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Display</span></td>
<td width="464">Manager   tampilan</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Displayable</span></td>
<td width="464">Objek yang   memiliki kemampuan ditampilkan pada layar.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Font</span></td>
<td width="464">Mengatur   huruf yang akan ditampilkan ke layar.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Gauge</span></td>
<td width="464">Tampilan   grafis yang digunakan untuk memvisualisasikan nilai tertentu yang diletakkan   pada Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Graphics</span></td>
<td width="464">Menyediakan   kemampuan menggambar pada sebuah Canvas.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Image</span></td>
<td width="464">Digunakan   untuk menyimpan data gambar.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">ImageItem</span></td>
<td width="464">Meyediakan   kotrol layout untuk gambar-gambar yang ditempatkan pada sebuah Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Item</span></td>
<td width="464">Kelas dasar   untuk menempatkan komponen-komponen yang dapat ditempatkan pada sebuah Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">List</span></td>
<td width="464">Layar yang   berisi daftar pilihan</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Screen</span></td>
<td width="464">Kelas dasar   semua komponen layar dalam high-level user interface.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">StringItem</span></td>
<td width="464">Item yang   berisi string yang kemudian ditempatkan pada Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">TextBox</span></td>
<td width="464">Layar yang   mengijinkan user memanipulasi teks dan bisa juga dijadikan media input.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">TextField</span></td>
<td width="464">Komponen   untuk memasukkan teks di atas Form.</td>
</tr>
<tr>
<td width="118"><span style="font-family: courier new,courier;">Ticker</span></td>
<td width="464">Bagian teks   yang berjalan terus-menerus di atas layar. Ticker tidak dapat ditempelkan   pada Canvas.</td>
</tr>
</tbody>
</table>
<p><strong>Arsitektur LCDUI</strong></p>
<p>Beriku hierarki class-class yang diambil dari pake lcdui (<span style="font-family: courier new,courier;">javax.microedition.lcdui</span>)</p>
<div id="attachment_257" class="wp-caption alignnone" style="width: 577px"><img class="size-full wp-image-257 " title="j2me_class_lcdui" src="http://www.andisun.com/wp-content/uploads/2009/07/j2me_class_lcdui.png" alt="Hierarki Class LCDUI" width="567" height="262" /><p class="wp-caption-text">Hierarki Class LCDUI</p></div>
<p>Dari class-class di atas yang dapat langsung ditampilkan ke layar hanya turunan dari class <span style="font-family: courier new,courier;">Displayable</span>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p256code2'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2562"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
</pre></td><td class="code" id="p256code2"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.microedition.lcdui.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.microedition.midlet.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MIDAlert <span style="color: #000000; font-weight: bold;">extends</span> MIDlet <span style="color: #000000; font-weight: bold;">implements</span> CommandListener <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Display display<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Form form<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Alert alert<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Command cmdExit<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> Command cmdAlert<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> MIDAlert<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        display <span style="color: #339933;">=</span> Display.<span style="color: #006633;">getDisplay</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">//membuat objek Form</span>
        form <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Form<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Demo Alert&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//membuat objek Command</span>
        cmdExit <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Command<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Exit&quot;</span>, Command.<span style="color: #006633;">EXIT</span>, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        cmdAlert <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Command<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Alert&quot;</span>, Command.<span style="color: #006633;">SCREEN</span>, <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//menambahkan objek Command &quot;cmdExit&quot; dan &quot;cmdAlert&quot;</span>
        form.<span style="color: #006633;">addCommand</span><span style="color: #009900;">&#40;</span>cmdExit<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        form.<span style="color: #006633;">addCommand</span><span style="color: #009900;">&#40;</span>cmdAlert<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">//menset event</span>
        form.<span style="color: #006633;">setCommandListener</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> startApp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//menentukan objek yang ditampilkan di layar</span>
        display.<span style="color: #006633;">setCurrent</span><span style="color: #009900;">&#40;</span>form<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> pauseApp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> destroyApp<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">boolean</span> unconditional<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> commandAction<span style="color: #009900;">&#40;</span>Command c, Displayable d<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c <span style="color: #339933;">==</span> cmdAlert<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">//memanggil method tampilAlert</span>
            tampilAlert<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c <span style="color: #339933;">==</span> cmdExit<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            destroyApp<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            notifyDestroyed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> tampilAlert<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">//membuat objek Alert dan menentukan String yang ditampilkan</span>
            alert <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Alert<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Informasi&quot;</span>, <span style="color: #0000ff;">&quot;Pesan ini tampil di User&quot;</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">//menentukan tipe Alert</span>
            alert.<span style="color: #006633;">setType</span><span style="color: #009900;">&#40;</span>AlertType.<span style="color: #006633;">ALARM</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">//menentukan lamanya Alert tampil</span>
            alert.<span style="color: #006633;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">//menampilkan Alert</span>
            display.<span style="color: #006633;">setCurrent</span><span style="color: #009900;">&#40;</span>alert<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> e<span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Sebuah aplikasi biasanya ketika menampilkan pesan menggunakan icon atau gambar tertentu, berikut tambahan kode program agar pesan yang ditampilkan di atas dapat menampilkan pesan yang disertai dengan gambar.</p>
<p>Hasil output dari program di atas adalah:</p>
<div id="attachment_258" class="wp-caption alignnone" style="width: 458px"><img class="size-full wp-image-258" title="j2me_ui_01" src="http://www.andisun.com/wp-content/uploads/2009/07/j2me_ui_01.png" alt="Sesudah dan sebelum diklik Alert" width="448" height="234" /><p class="wp-caption-text">Sesudah dan sebelum diklik Alert</p></div>
<p>Ubahlah method <span style="font-family: courier new,courier;">tampilAlert()</span> menjadi seperti berikut:</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 2806px; width: 1px; height: 1px;"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves /> <w:TrackFormatting /> <w:PunctuationKerning /> <w:ValidateAgainstSchemas /> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF /> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> <w:DontGrowAutofit /> <w:SplitPgBreakAndParaMark /> <w:DontVertAlignCellWithSp /> <w:DontBreakConstrainedForcedTables /> <w:DontVertAlignInTxbx /> <w:Word11KerningPairs /> <w:CachedColBalance /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math" /> <m:brkBin m:val="before" /> <m:brkBinSub m:val=" " /> <m:smallFrac m:val="off" /> <m:dispDef /> <m:lMargin m:val="0" /> <m:rMargin m:val="0" /> <m:defJc m:val="centerGroup" /> <m:wrapIndent m:val="1440" /> <m:intLim m:val="subSup" /> <m:naryLim m:val="undOvr" /> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"   DefSemiHidden="true" DefQFormat="false" DefPriority="99"   LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Normal" /> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="heading 1" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 2" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 3" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 4" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 5" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 6" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 7" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 8" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="heading 9" /> <w:LsdException Locked="false" Priority="39" Name="toc 1" /> <w:LsdException Locked="false" Priority="39" Name="toc 2" /> <w:LsdException Locked="false" Priority="39" Name="toc 3" /> <w:LsdException Locked="false" Priority="39" Name="toc 4" /> <w:LsdException Locked="false" Priority="39" Name="toc 5" /> <w:LsdException Locked="false" Priority="39" Name="toc 6" /> <w:LsdException Locked="false" Priority="39" Name="toc 7" /> <w:LsdException Locked="false" Priority="39" Name="toc 8" /> <w:LsdException Locked="false" Priority="39" Name="toc 9" /> <w:LsdException Locked="false" Priority="0" QFormat="true" Name="caption" /> <w:LsdException Locked="false" Priority="10" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Title" /> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /> <w:LsdException Locked="false" Priority="0" Name="Body Text" /> <w:LsdException Locked="false" Priority="11" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /> <w:LsdException Locked="false" Priority="22" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Strong" /> <w:LsdException Locked="false" Priority="0" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /> <w:LsdException Locked="false" Priority="0" Name="Plain Text" /> <w:LsdException Locked="false" Priority="59" SemiHidden="false"    UnhideWhenUsed="false" Name="Table Grid" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /> <w:LsdException Locked="false" Priority="1" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 1" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 1" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 1" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /> <w:LsdException Locked="false" Priority="34" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /> <w:LsdException Locked="false" Priority="29" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Quote" /> <w:LsdException Locked="false" Priority="30" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 1" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 1" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 2" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 2" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 2" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 2" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 2" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 3" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 3" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 3" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 3" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 3" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 4" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 4" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 4" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 4" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 4" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 5" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 5" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 5" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 5" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 5" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /> <w:LsdException Locked="false" Priority="60" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Shading Accent 6" /> <w:LsdException Locked="false" Priority="61" SemiHidden="false"    UnhideWhenUsed="false" Name="Light List Accent 6" /> <w:LsdException Locked="false" Priority="62" SemiHidden="false"    UnhideWhenUsed="false" Name="Light Grid Accent 6" /> <w:LsdException Locked="false" Priority="63" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /> <w:LsdException Locked="false" Priority="64" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /> <w:LsdException Locked="false" Priority="65" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /> <w:LsdException Locked="false" Priority="66" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /> <w:LsdException Locked="false" Priority="67" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /> <w:LsdException Locked="false" Priority="68" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /> <w:LsdException Locked="false" Priority="69" SemiHidden="false"    UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /> <w:LsdException Locked="false" Priority="70" SemiHidden="false"    UnhideWhenUsed="false" Name="Dark List Accent 6" /> <w:LsdException Locked="false" Priority="71" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /> <w:LsdException Locked="false" Priority="72" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful List Accent 6" /> <w:LsdException Locked="false" Priority="73" SemiHidden="false"    UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /> <w:LsdException Locked="false" Priority="19" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /> <w:LsdException Locked="false" Priority="21" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /> <w:LsdException Locked="false" Priority="31" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /> <w:LsdException Locked="false" Priority="32" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /> <w:LsdException Locked="false" Priority="33" SemiHidden="false"    UnhideWhenUsed="false" QFormat="true" Name="Book Title" /> <w:LsdException Locked="false" Priority="37" Name="Bibliography" /> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /> </w:LatentStyles> </xml><![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Verdana; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:536871559 0 0 0 415 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	mso-bidi-font-size:12.0pt; 	font-family:"Verdana","sans-serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} p.CodeBody, li.CodeBody, div.CodeBody 	{mso-style-name:"Code Body"; 	mso-style-unhide:no; 	margin-top:0in; 	margin-right:8.5pt; 	margin-bottom:3.0pt; 	margin-left:8.5pt; 	mso-pagination:widow-orphan; 	background:#F3F3F3; 	mso-layout-grid-align:none; 	text-autospace:none; 	border:none; 	mso-border-top-alt:solid windowtext .5pt; 	mso-border-bottom-alt:solid windowtext .5pt; 	padding:0in; 	mso-padding-alt:1.0pt 0in 1.0pt 0in; 	font-size:10.0pt; 	mso-bidi-font-size:9.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"Times New Roman"; 	color:#231F20;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]> <mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman","serif";} --> <!--[endif]--></p>
<div style="border-style: solid none; border-color: windowtext -moz-use-text-color; border-width: 1pt medium; padding: 1pt 0in; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; margin-left: 8.5pt; margin-right: 8.5pt;">
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">private void tampilAlert() {</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">try {</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">//membuat objek Image</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">Image img = Image.createImage(&#8220;/globe.png&#8221;);</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">//membuat objek Alert dan menentukan String yang ditampilkan</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">alert = new Alert(&#8220;Informasi&#8221;, &#8220;Pesan ini tampil di User&#8221;, img, null);</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">//menentukan tipe Alert</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">alert.setType(AlertType.ALARM);</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">//menentukan lamanya Alert tampil</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">alert.setTimeout(5000);</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">//menampilkan Alert</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">display.setCurrent(alert);</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">} catch(Exception e) {</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">System.out.println(e.getMessage());</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">}</p>
<p class="CodeBody" style="margin: 0in 0in 3pt; background: #f3f3f3 none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">}</p>
</div>
</div>
<pre>private void tampilAlert() {
	try {
		//membuat objek Image
		Image img = Image.createImage("/globe.png");

		//membuat objek Alert dan menentukan String yang ditampilkan
		alert = new Alert("Informasi", "Pesan ini tampil di User", img, null);

		//menentukan tipe Alert
		alert.setType(AlertType.ALARM);

		//menentukan lamanya Alert tampil
		alert.setTimeout(5000);

		//menampilkan Alert
		display.setCurrent(alert);
	} catch(Exception e)  {
		System.out.println(e.getMessage());
	}
}</pre>
<p>Tampilan ketika ditambahkan gambar pada <span style="font-family: courier new,courier;">Alert</span>.</p>
<div id="attachment_259" class="wp-caption alignnone" style="width: 259px"><img class="size-full wp-image-259" title="j2me_alert_icon" src="http://www.andisun.com/wp-content/uploads/2009/07/j2me_alert_icon.png" alt="Tampilan Alert setelah ditambah image" width="249" height="271" /><p class="wp-caption-text">Tampilan Alert setelah ditambah image</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.andisun.com/tutorials/j2me-programming/user-interface-pada-j2me/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
