pemrograman desktop

Post on 02-Jan-2016

120 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

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

Kode MK : MI Revisi Terakhir :

PEMROGRAMAN DESKTOP

Sesi 3

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

Adi Kusjani, S.T.

Property dan Method

2013

Outline

Tujuan Pokok Bahasan : Metode dan property

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

Referensi

2

Tujuan Intruksional

Dapat mengidentifikasi metode dan properti komponen

Dapat menyebutkan metode dan properti komponen

Dapat menggunakan metode dan properti komponen

3

Pokok Bahasan

Pemanfaatan metode Property pada komponen

4

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

Jendela Properti untuk JFrame6

Title = digunakan untuk menganti Judul Frame

Background = menganti warna backgraound frame

Jendela Propery JLabel7

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.

...

Referensi

Reff 1 Reff 2 Reff 3

9

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

top related