Contoh penggunaan fungsi fo while pada java menggunakan JFrame

/*
 * @NGATMIN
 * @2112R0558
 * STMIK HIMSYA SEMARANG
 */
import javax.swing.*;
import java.awt.*;
public class soal_3c extends JFrame {
    JTextArea tombol;
    int n=0;
    public soal_3c(){
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        tombol = new JTextArea("");
        JScrollPane js = new JScrollPane(tombol);
        js.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        js.setBounds(20, 20, 320, 230);
        getContentPane().add(js);
        getContentPane().setLayout(null);
        do{
          tombol.append(" NGATMIN | STMIK HIMSYA SEMARANG\n");
          tombol.setBackground(Color.GREEN);
          tombol.setFont(new Font("Arial Black",1,12));
      n++;
      } while(n<100);
   
        this.setSize(370,300);
        this.setLocationRelativeTo(null);
        this.setResizable(false);
        this.setTitle("Soal 2 | do while");
        setVisible(true);
    }
    public static void main(String []aa){
       new soal_3c();
    } 
}

0 Response to "Contoh penggunaan fungsi fo while pada java menggunakan JFrame"

Posting Komentar