getContentPane().add()的含义是否与add()相同 [英] Does getContentPane().add() mean the same as add()
本文介绍了getContentPane().add()的含义是否与add()相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
getContentPane().add()的含义是否与add()相同?
Does getContentPane().add() mean the same as add() ?
public class TestFrame extends JFrame{
public TestFrame() {
JLabel label = new JLabel("jo");
getContentPane().add(label);
add(label);
}
}
推荐答案
getContentPane().add()的含义是否与add()相同?
Does getContentPane().add() mean the same as add() ?
是的,从1.5开始.
这篇关于getContentPane().add()的含义是否与add()相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文