81,092
社区成员
发帖
与我相关
我的任务
分享
public class wordbean extends HttpServlet {
String title;
HttpServletRequest req;
HttpServletResponse res;
public wordbean(String title) throws Exception {
super();
this.title = title;
search(req,res);
}
public void search(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//response.sendRedirect("http://www.baidu.com");
System.out.println(title);
}
}
public class GraphView extends JPrefuseApplet {
private static final String graph = "graph";
private static final String nodes = "graph.nodes";
private static final String edges = "graph.edges";
public void init() {
UILib.setPlatformLookAndFeel(); //�����û�������ϵͳ���ϣ�����ļ�api
JComponent graphview = demo("C://air.xml", "name"); //����xml�ļ�����name�ڵ��ȡ���õ�ͼ�ᅣ1�7
this.getContentPane().add(graphview); //��ͼ�μ��뵽swing�����ȥ��ʄ1�7
}
.....
.....
...
display.addControlListener(new ControlAdapter(){
public void itemClicked(VisualItem item, MouseEvent e) {
// TODO Auto-generated method stub
if (item.canGetString(label))
System.out.println(item.getString(label));
try {
System.out.println(new Fre_pos().FindNumP(item.getString(label)));
title.setText(new Fre_pos().FindNumP(item.getString(label)));
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});