多组见 管理(求救)
caoco 2001-04-25 05:22:00
加卡片单独测试时是完全正确,但是加入组件管理器后有异常:java.lang.NullPointerException: 问题表现
在frame.show()。但是真正的是出现在下面。在卡片组件中加入一个卡片是好的,加入两个就有异常。
部分代码:
tabbedPane = new JTabbedPane();
tabbedPane.addChangeListener(this);
ImageIcon icon = new ImageIcon("yellow-ball.gif");
// tabbedPane.addTab("Mercury", icon, null);
// tabbedPane.addTab("Venus", icon, null);
tabbedPane.addTab("Earth", icon, null);
// tabbedPane.addTab("Mars", icon, null);
// tabbedPane.addTab("Jupiter", icon, null);
// tabbedPane.addTab("Saturn", icon, null);
// tabbedPane.addTab("Uranus", icon, null);
// tabbedPane.addTab("Neptune", icon, null);
// tabbedPane.addTab("Pluto", icon, null);
JSplitPane unionPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
innerPane,tabbedPane);
public void stateChanged(ChangeEvent event){
}
希望大侠们给我联系:ying_stone@sina.com