macam mana nak tulis coding yang betul bagi JDialog & panel..
dah cube buat, tp xkuar output.. javascript:emoticonp('')
public class SJDialog extends JApplet
{
public void init()
{
Container pane=getContentPane();
pane.setBackground(Color.white);
pane.setLayout(new FlowLayout());
Label lb1=new Label("WELCOME TO JAVA",Label.CENTER);
JFrame frm=new JFrame("Java Swing JDialog");
JDialog dialog = new JDialog(frm,"Click a button",true);
dialog.setContentPane(frm);
pane.add(lb1);
pane.add(dialog);
}
}
dah cube buat, tp xkuar output.. javascript:emoticonp('')
public class SJDialog extends JApplet
{
public void init()
{
Container pane=getContentPane();
pane.setBackground(Color.white);
pane.setLayout(new FlowLayout());
Label lb1=new Label("WELCOME TO JAVA",Label.CENTER);
JFrame frm=new JFrame("Java Swing JDialog");
JDialog dialog = new JDialog(frm,"Click a button",true);
dialog.setContentPane(frm);
pane.add(lb1);
pane.add(dialog);
}
}