pemrograman desktop

10
Kode MK : MI Revisi Terakhir : PEMROGRAMAN DESKTOP Sesi 3 FX. Henry Nugroho, S.T., M.Cs. Adi Kusjani, S.T. Property dan Method 2013

Upload: ursa-griffith

Post on 02-Jan-2016

116 views

Category:

Documents


2 download

DESCRIPTION

PEMROGRAMAN DESKTOP. FX. Henry Nugroho, S.T., M.Cs. Adi Kusjani , S.T. Property dan Method. 2013. Sesi 3. Outline. Tujuan Pokok Bahasan : Metode dan property Komponen Sub Pokok Bahasan 1 : property komponen Sub Pokok Bahasan 2 : metode komponen Referensi. Tujuan Intruksional. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: PEMROGRAMAN DESKTOP

Kode MK : MI Revisi Terakhir :

PEMROGRAMAN DESKTOP

Sesi 3

FX. Henry Nugroho, S.T., M.Cs.

Adi Kusjani, S.T.

Property dan Method

2013

Page 2: PEMROGRAMAN DESKTOP

Outline

Tujuan Pokok Bahasan : Metode dan property

Komponen Sub Pokok Bahasan 1 : property komponen Sub Pokok Bahasan 2 : metode komponen

Referensi

2

Page 3: PEMROGRAMAN DESKTOP

Tujuan Intruksional

Dapat mengidentifikasi metode dan properti komponen

Dapat menyebutkan metode dan properti komponen

Dapat menggunakan metode dan properti komponen

3

Page 4: PEMROGRAMAN DESKTOP

Pokok Bahasan

Pemanfaatan metode Property pada komponen

4

Page 5: PEMROGRAMAN DESKTOP

Property Komponen

5

Masing-masing komponen Swing memiliki property

Jendela Properties digunakan untuk mengedit properti dari komponen yang sedang aktif dalam jendela design.

Property dapat dilihat dengan klik kanan mouse kemudian klik property

Page 6: PEMROGRAMAN DESKTOP

Jendela Properti untuk JFrame6

Title = digunakan untuk menganti Judul Frame

Background = menganti warna backgraound frame

Page 7: PEMROGRAMAN DESKTOP

Jendela Propery JLabel7

Page 8: PEMROGRAMAN DESKTOP

8

Method pada JLabel

Return Type

Methode

 void setText(String text)  Defines the single line of text this component will display.

 String getText() Returns the text string that the label displays.

 void setHorizontalAlignment(int alignment)  Sets the alignment of the label's contents along the X axis.

 void setHorizontalTextPosition(int textPosition) Sets the horizontal position of the label's text, relative to its image.

 void setIcon(Icon icon)  Defines the icon this component will display.

...

Page 9: PEMROGRAMAN DESKTOP

Referensi

Reff 1 Reff 2 Reff 3

9

Page 10: PEMROGRAMAN DESKTOP

Soal / Tugas

Identifikasi 5 property dan 5 method pada komponen Dasar (JLabel, JText dan JButton)

Beri penjelasan property dan metode tersebut serta contoh penggunaan/pemanggilannya dalam aplikasi

Dikerjakan perorangan Waktu 1 minggu

10