Rabu, 06 Februari 2013

Shape sederhana berbasis web

Sebelum ngantuk melanda posting dulu ahhhh ........
iseng googling2 ehh ada contoh shape sederhana berbasis web, nah ini nemu gmn cara buat persegi dan lingkaran, tp klo elips carana sama sih ama lingkaran cmn nanti d width ama heightnya... langsung share aja ya....
scriptnya :
 
 outputnya :

  selamat mencoba...........^-^^^^_^^^^^_^^^



see you next posting........... :)))

Sabtu, 02 Februari 2013

Warna Tersier Di Java

Buat Pengantar tidur, yang bosen ama warna primer, maka beralihlah ke warna tersier..... :D
 @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == bcoklat) {
            p1.setBackground(Color.decode("#964B00"));
        } else if (e.getSource() == bungu) {
            p1.setBackground(Color.decode("#8F00FF"));
        } else if (e.getSource() == bmerahmarun) {
            p1.setBackground(Color.decode("#800000"));
        } else if (e.getSource() == bijoarmi) {
            p1.setBackground(Color.decode("#808000"));
        }else if(e.getSource()==bbirutua){
            p1.setBackground(Color.decode("#000080"));
        }
       
    }

 nah kita pke method decode trus  di stringnya pake bilangan hexasanya, gampang kan biar gak bosen pke warna primer mulu.... :), nah hasilnya kurang lebih gni :
coklat :

ungu :
 
 sekian terima kasih.... selamat malam.... :D