Kamis, 22 Maret 2012
visual programimng
import javax.swing.*;
import java.awt.*;
class tugas_java
{
public static void main (String [] args)
{
JFrame frame= new JFrame();
JLabel lbl= new JLabel("NPM");
JLabel lbl1 = new JLabel ("NAMA ");
JLabel lbl2 = new JLabel ("KELAS");
JLabel lbl3 = new JLabel ("JURUSAN");
JLabel lbl4= new JLabel(":");
JLabel lbl5= new JLabel(":");
JLabel lbl6= new JLabel(":");
JLabel lbl7= new JLabel(":");
JLabel lbl8= new JLabel("200943500144");
JLabel lbl9= new JLabel("Muhammad Amir");
JLabel lbl10= new JLabel("6c(sore)");
JLabel lbl11= new JLabel("T. Informatika");
JTextField txt = new JTextField ();
JTextField txt1 = new JTextField ();
JTextField txt2 = new JTextField ();
JTextField txt3 = new JTextField ();
txt.setBounds(126,25,100,25);
txt1.setBounds(126,50,100,25);
txt2.setBounds(126,75,100,25);
txt3.setBounds(126,100,100,25);
lbl.setBounds(25,25,100,25);
lbl1.setBounds(25,50,100,25);
lbl2.setBounds(25,75,100,25);
lbl3.setBounds(25,100,100,25);
lbl4.setBounds(123,25,100,25);
lbl5.setBounds(123,50,100,25);
lbl6.setBounds(123,75,100,25);
lbl7.setBounds(123,100,100,25);
frame.add(lbl);
frame.add(lbl1);
frame.add(lbl2);
frame.add(lbl3);
frame.add(lbl4);
frame.add(lbl5);
frame.add(lbl6);
frame.add(lbl7);
frame.add(txt);
frame.add(txt1);
frame.add(txt2);
frame.add(txt3);
frame.setSize(300,300);
frame.setTitle("Visual Programing");
frame.setLayout(null);
frame.setVisible(true);
}
}
Langganan:
Postingan (Atom)