Java创建一个及对话框
package zhongyu;
import javax.swing.*;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Demo extends JDialog{
public Demo() {
Container c = getContentPane();
c.add(new JLabel("博主是帅哥!!!"));
setVisible(true);
setBounds(300,300,300,300);
}
public static void main(String[] args) {
JFrame f = new JFrame("父窗体");
f.setBounds(100,100,620,620);
Container c = f.getConten
Java创建一个及对话框最先出现在Python成神之路。
共有 0 条评论