public class Frame1 extends JFrame
{
JPanel contentPane;
Image image1;
BorderLayout borderLayout1 = new BorderLayout();//Construct the frame
public Frame1()
{
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try
{image1=createImage(16,32);if(image1==null)
{
System.out.println("create a null");
System.exit(-1);
}
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}为什么createImage()运行的时侯总是返回null?
{
JPanel contentPane;
Image image1;
BorderLayout borderLayout1 = new BorderLayout();//Construct the frame
public Frame1()
{
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try
{image1=createImage(16,32);if(image1==null)
{
System.out.println("create a null");
System.exit(-1);
}
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}为什么createImage()运行的时侯总是返回null?
解决方案 »
- 加载数据库驱动的问题
- JAVA UPD通信:ADSL拨号,外网给内网发包能收到,内网给外网回包收不到
- 使用InstallAnywhere软件打包Java软件问题?
- 为什么抽象类里的方法必须是静态的才可以使用
- 求这两个理论或规则的资料
- 奇异的ClassCastException问题.
- Enumeration是什么,是数据类型吗?
- 为什么不能在JcomboBox中添加KeyEvent事件?
- 急!!请问怎么样用java修改系统年月日(谢谢)
- Object.wait() 和Thread.yield()有什么区别
- 软件工程师必读的好文章---《软件工程思想》全文,可下载。
- 在JBuilder 中如何倒入类库(.jar包)呢?请知道的人帮帮忙!!
如果窗体是不可见的就会返回null;