不能创建对象

subarashii subarashii 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
不能创建test对象。这是个向导式对话框,现在要创建test对象 但是不知为何不行

public class NewChannelWizard extends Wizard {
public static String cb;
private NewChannelOne one = new NewChannelOne();
private NewChannelTwo two = new NewChannelTwo();
test t=new test();
public NewChannelWizard() {
this.addPage(one);
this.addPage(two);
this.setWindowTitle("New Channel");

}

@Override
public boolean performFinish() {

String channelurl ;
String channel_name ;
String category_name ;
URL feedUrl = null;
System.out.println("1");
channelurl = one.text.getText();
channel_name = two.text.getText();
category_name = two.combo.getText();

try {
t.done(feedUrl,category_name);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
System.out.println("2");
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("3");
e.printStackTrace();
} catch (FeedException e) {
// TODO Auto-generated catch block
System.out.println("4");
e.printStackTrace();
}


ChannelView.db.addChannel(channelurl, channel_name, category_name,null );// 作者从解析器获取
ChannelView.initdata();
ChannelView.tree.setInput(ChannelView.data);
ChannelView.tree.refresh();



return true;
}
public boolean canFinish(){
if(this.getContainer().getCurrentPage()==two){
return true;
}
else
return false;

}




}


public class test {

public test(){
System.out.println("test");

}
public void done(URL channelurl,String category_name) throws IllegalArgumentException, IOException, FeedException{
int articlecount;
String author = null;
String content= null;
String pubdate= null;
String articleurl= null;
String title = null;
URL feedUrl = null;
Listen lis=new Listen(feedUrl);
List entry=lis.parseroutput.getEntries();
articlecount=entry.size();
for(int i=0;i<articlecount;i++){
articleurl=lis.parseroutput.getLink(i);
title=lis.parseroutput.getTitle(i);
pubdate=lis.parseroutput.getPubDate(i).toString();
content=lis.parseroutput.getDescription(i);
author=lis.parseroutput.getAuthor(i);
ChannelView.db.addArticle(articleurl,title, pubdate, content, channelurl.toString(), category_name, author);
}

}

}
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
subarashii
Java SE 62,620 成员 307,251 内容