ÀÓº£µðµå ÇÁ·Î±×·¡¹Ö  

         
Àüü ±âŸ | WinCE | Delphi | VisualC | ARM | Media | SE | ¸¶¸®¿À³×Æ® | Java | wdm | JTAG | ¿µ»óó¸® | ÀÎÁõ | Áú¹®/´äº¯ | H/W | ¾Ë°í¸®Áò | Platform | .net | VB | PPC | Network | android | QT | WWW | Linux |
java °£´ÜÇÑ ´ÙÀ̾ó·Î±× ¶ç¿ì±â
ÇÏâȣ08-29 05:07 | HIT : 8,371

UPLOAD 2 :: UITestDoc.zip (1.98 MB) | DOWN : 50


import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.CheckboxGroup;
import java.awt.Dialog;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.Panel;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

/**
* This example shows AWT Dialog.
* @author TogetherSoft
*/
public class TestDialog extends Dialog {
    public TestDialog(Frame frame) {
        super(frame);
        initGUI();
    }

    /** This method is called from within the constructor to initialize the form. */
    void initGUI() {
        addWindowListener(
            new WindowAdapter() {
                public void windowClosing(WindowEvent e) { thisWindowClosing(e); }
            });
        setBounds(new Rectangle(0, 0, 500, 300));
        setResizable(false);
        setTitle("Test Dialog");
        add(buttonPanel, BorderLayout.SOUTH);
        add(contentPanel, BorderLayout.CENTER);
        buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
        buttonPanel.add(butttonHolder);
        butttonHolder.setLayout(new GridLayout(1, 0, 5, 0));
        butttonHolder.add(okButton);
        butttonHolder.add(cancelButton);
        okButton.setLabel("OK");
        cancelButton.setLabel("Cancel");
        okButton.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) { okButtonActionPerformed(e); }
            });
        cancelButton.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(e); }
            });
        contentPanel.setLayout(null);
        contentPanel.add(optionLabel);
        optionLabel.setText("Select one of the options below");
        optionLabel.setBounds(new java.awt.Rectangle(121, 70, 186, 35));
    }

    void cancel() {
        dispose();
        System.exit(0);
    }

    void ok() {
        Checkbox box = checkboxGroup1.getSelectedCheckbox();
        System.out.println(box.getLabel() + " is selected");
        cancel();
    }

    public void thisWindowClosing(WindowEvent e) {
        cancel();
    }

    public void okButtonActionPerformed(ActionEvent e) {
        ok();
    }

    public void cancelButtonActionPerformed(ActionEvent e) {
        cancel();
    }

    public static void main(String[] args) {
        Frame frame = new Frame();
        TestDialog dialog = new TestDialog(frame);
        dialog.show();
    }

    private Panel contentPanel = new Panel();
    private Panel buttonPanel = new Panel();
    private Panel butttonHolder = new Panel();
    private Button okButton = new Button();
    private Button cancelButton = new Button();
    private CheckboxGroup checkboxGroup1 = new CheckboxGroup();
    private Label optionLabel = new Label();
}



 Java :: java °£´ÜÇÑ ´ÙÀ̾ó·Î±× ¶ç¿ì±â    ÇÏâȣ 2007¡¤08¡¤29 8371
2  Java :: Together ·Î ¸¸µç ¸ð¾ç¸¸ °è»ê±âÀÎ ÇÁ·Î±×·¥ (½Ã°£...    ÇÏâȣ 2004¡¤08¡¤31 3794
1  Java :: ÀÚ¹Ù ±âÃÊ I/O ¹®¹ý ¿¹Á¦  ¡¦1  ÇÏâȣ 2004¡¤08¡¤30 3475
1
   
Copyright 1999-2018 Zeroboard / skin by GGAMBO
....