
hi.. i have a problem with my gui program
there are checked number at there
number 1 : how can i suite the JTextField into JPanel??
so the result is like this

hi.. i have a problem with my gui program
number 2 : how can i put the form lower?? i've try this many time, but i ca't solve it
so the result like this

hi.. i have a problem with my gui program
number 3 : same like number 1, how can i suite the JButton into its JPanel
so the result like this

hi.. i have a problem with my gui program
and here is my code
GeSHi (java):
import java.awt.*;
import javax.swing.*;
import javax.swing.border.Border;
public class h3latihan1
extends JFrame {
JLabel utara =
new JLabel("Form Check List Kondisi Ruangan Lab Software");
private String tf
[] =
{"Nama :",
"Ruangan :",
"Password :",
"Wilayah :",
"Bagian :",
"Kerusakan :"};
private String bt
[] =
{"Submit",
"Reset",
"Exit"};
//Border emptyBorder = BorderFactory.createEmptyBorder(0, 0, 0, 0);
h3latihan1()
{
north.add(utara);
utara.
setForeground(Color.
WHITE);
north.
setBackground(Color.
BLACK);
utara.
setFont(new Font("Showcard Gothic",
Font.
BOLD,
25));
add(north,"North");
for(int i=1;i<=16;i++)
{
timur
[i
].
setForeground(Color.
WHITE);
timur
[i
].
setBackground(Color.
BLACK);
east.add(timur[i]);
}
east.
setPreferredSize(new Dimension(200,
200));
add(east,"East");
for(int i=1;i<=16;i++)
{
barat
[i
].
setForeground(Color.
WHITE);
barat
[i
].
setBackground(Color.
BLACK);
west.add(barat[i]);
}
west.
setPreferredSize(new Dimension(200,
200));
add(west,"West");
for(int i=0;i<6;i++)
{
south3.
add(selatan
[i
] =
new JLabel(tf
[i
]));
if(i==2)
{
}
else
{
}
south.add(south3);
south2.add(south);
}
for(int i=0;i<3;i++)
{
south4.
add(selatan3
[i
]=
new JButton(bt
[i
]));
south2.add(south4);
}
south2.
setPreferredSize(new Dimension (300,
200));
south5.add(south2);
south5.
setBackground(Color.
BLACK);
central3.
setPreferredSize(new Dimension(150,
200));
//central3.setBorder(emptyBorder);
tengah2.
setPreferredSize(new Dimension(100,
200));
central.
setPreferredSize(new Dimension(150,
200));
central2.add(central3);
central2.add(central);
central1.
setBackground(Color.
BLUE);
central1.add(central2);
f.setBounds(center.x - 900 / 2, center.y - 500 / 2,900,500);
f.
setDefaultCloseOperation(JFrame.
EXIT_ON_CLOSE);
//f.pack();
f.setVisible(true);
}
public static void main
(String[]args
) {
new h3latihan1();
}
}
Created by GeSHI 1.0.7.20