显示this.show()过时
来源:百度知道 编辑:UC知道 时间:2024/09/28 14:18:46
代码如下
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class buju extends JFrame implements ActionListener
{
int i;
JButton jb=new JButton("0");
JPanel jp=new JPanel();
public buju()
{
this.setTitle("222");
jp.setLayout(new FlowLayout());
jp.add(jb);
jb.addActionListener(this);
this.add(jp);
this.setBounds(300,250,300,200);
this.setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
++i;
JButton jbi=new JButton("11"+i);
jp.add(jbi);
this.show(true);
}
public static void main(String args[])
{
buju s=new buju();
}}
显示代码过时,要如何更换this.SHOW()啊
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class buju extends JFrame implements ActionListener
{
int i;
JButton jb=new JButton("0");
JPanel jp=new JPanel();
public buju()
{
this.setTitle("222");
jp.setLayout(new FlowLayout());
jp.add(jb);
jb.addActionListener(this);
this.add(jp);
this.setBounds(300,250,300,200);
this.setVisible(true);
}
public void actionPerformed(ActionEvent e)
{
++i;
JButton jbi=new JButton("11"+i);
jp.add(jbi);
this.show(true);
}
public static void main(String args[])
{
buju s=new buju();
}}
显示代码过时,要如何更换this.SHOW()啊
this.setVisable(true);
以后再碰到这种问题,就去网上下个中文API,上面会告诉你,怎么解决这种问题的。用什么方法替代的
先是函数过时只是警告而已。可以不必理会。最菜完美一点的话可以用setVisible替代。。。语句为this.setVisable(true);
用this.setVisable(true);
根据当前版本来
JAVA的语句有些随着版本有变化。
this.setVisible(true);
Do not show this again
do not show this dialog again
Share this Slide Show是啥意思
This is time for the big show, baby
this pair of glasses is too expensive.please show me___
Can you _____ an example to show the meaning of this word?
Millie is free this weekend.she___watch the game show on TV on sunday
This introductory article will try to show you how to use . . .
为什么!瑞星防火墙18.21,安装之后显示已经过时啊
我的7610上*#92702689#后显示操作过时,是什么意思?