Lha program iki, kanggone yo gawe ngedit TULISAN sing onok ning TEXTFIELD. Maksud e iku, text sing onok nang nggone TEXTFIELD iso di dadino BOLD lan ITALIC, ora mung iku thok, TEXT e wi maeng yo iso dikek i WARNA contoh e warna abang, biru, ijo lan sak liane.
Ben gak bingung, nyoh wes tak kek i conto gambar e, gambar e iki oleh ku nggarap wong 2 ambek M. Firson Destadiawan.
Iki lho gambar e.
Pengen ngerti toh cara nggawene, lha iki, nang nisor wes tak kek i SCRIPT e.
Nyoh...private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String s;
s=jTextField1.getText();
jLabel1.setText(s);
}
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {
if(jCheckBox1.isSelected()==true && jCheckBox2.isSelected()==true)
jLabel1.setFont(new java.awt.Font(“Tahoma”, 3, 14));
if(jCheckBox1.isSelected()==true && jCheckBox2.isSelected()==false)
jLabel1.setFont(new java.awt.Font(“Tahoma”, 1, 14));
if(jCheckBox1.isSelected()==false && jCheckBox2.isSelected()==true)
jLabel1.setFont(new java.awt.Font(“Tahoma”, 2, 14));
if(jCheckBox1.isSelected()==false && jCheckBox2.isSelected()==false)
jLabel1.setFont(new java.awt.Font(“Tahoma”, 0, 14));
}
private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed(evt);
}
private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {
jLabel1.setForeground(new java.awt.Color(255, 255, 0));
}
private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt)
{
jLabel1.setForeground(new java.awt.Color(0, 0, 255));
}
private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
jLabel1.setForeground(new java.awt.Color(0, 255, 0));
}
private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
jLabel1.setForeground(new java.awt.Color(255, 0, 0));
}
Lek sek ora mudeng, mending langsung takon nang guru Java ae.
Aku asline yo ra mudeng kok.
hahaha....
Lek sek ora mudeng, mending langsung takon nang guru Java ae.
Aku asline yo ra mudeng kok.
hahaha....
Tidak ada komentar:
Posting Komentar