java - JButton calling another class -


i have little problem actionlistener. when press button doesn't run code alot errors here. doing wrong, , how run class putting action code after pressing button.

package org.jsoup.examples;

import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.io.ioexception; import java.io.printwriter;  import javax.swing.jbutton; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.jpanel;  import org.jsoup.*; import org.jsoup.nodes.*;   public class javaapplication17 {     public static void main( string[] args ) throws ioexception {          jframe frame = new jframe ("orai");         frame.setvisible(true);         frame.setsize(200,200);         frame.setdefaultcloseoperation(jframe.exit_on_close);          jlabel label = new jlabel("infodienos orai");         jpanel panel = new jpanel();         frame.add(panel);         panel.add(label);          jbutton lietuvoje = new jbutton("lietuvoje");         panel.add(lietuvoje);             lietuvoje.addactionlistener(new actionlistener() {             public void actionperformed(actionevent e) {                 string[] nuoroda = new string[10];                 nuoroda[0] = "http://www.gismeteo.lt/city/hourly/4230/#wdaily2";                 nuoroda[1] = "http://www.gismeteo.lt/city/hourly/4202/#wdaily2";                 nuoroda[2] = "http://www.gismeteo.lt/city/hourly/4157/#wdaily2";                 nuoroda[3] = "http://www.gismeteo.lt/city/hourly/4170/#wdaily2";                 nuoroda[4] = "http://www.gismeteo.lt/city/hourly/4175/#wdaily2";                 nuoroda[5] = "http://www.gismeteo.lt/city/hourly/4152/#wdaily2";                 nuoroda[6] = "http://www.gismeteo.lt/city/hourly/4203/#wdaily2";                 nuoroda[7] = "http://www.gismeteo.lt/city/hourly/4163/#wdaily2";                 nuoroda[8] = "http://www.gismeteo.lt/city/hourly/4166/#wdaily2";                 nuoroda[9] = "http://www.gismeteo.lt/city/hourly/4201/#wdaily2";                      (int j = 0; j < 10; j++) {                 document doc = jsoup.connect(nuoroda[j]).timeout(10*10000).useragent("mozilla/17.0").get();                 printwriter temp = new printwriter("d:/user documents/desktop/orai/lietuvoje/temp/"+j+".txt");                 printwriter pav = new printwriter("d:/user documents/desktop/orai/lietuvoje/pav/"+j+".txt");                 printwriter atmosfera = new printwriter("d:/user documents/desktop/orai/lietuvoje/atmosfera/"+j+".txt");                 printwriter vejas = new printwriter("d:/user documents/desktop/orai/lietuvoje/vejas/"+j+".txt");                 printwriter greitis = new printwriter("d:/user documents/desktop/orai/lietuvoje/greitis/"+j+".txt");                 printwriter dregnumas = new printwriter("d:/user documents/desktop/orai/lietuvoje/dregnumas/"+j+".txt");                 printwriter faze = new printwriter("d:/user documents/desktop/orai/lietuvoje/faze/"+j+".txt");                 printwriter menulis = new printwriter("d:/user documents/desktop/orai/lietuvoje/menulis/"+j+".txt");                  (int = 8; < 16; i++) {                 element ele=doc.select("td.temp > span.value.m_temp.c").get(i);                  element ele2=doc.select("td.clicon > img").get(i); // 8 - 15                 element ele3=doc.select("td.cltext").get(i); // 8 - 15                 element ele4=doc.select("dl.wind > dt").get(i); // 8 - 15                 element ele6=doc.select("div.wicon.hum").first(); // 8 - 15                 element ele7=doc.select("ul.moon.moon5 > li").get(1); // 8 - 15                 element ele8=doc.select("ul.moon.moon5 > li").get(1); // 8 - 15                 //system.out.println(ele4.text());                 if (ele4.text().tostring().equals("Š")) {                         vejas.println("##1");                 }                 if (ele4.text().tostring().equals("p")) {                     vejas.println("##2");             }                 if (ele4.text().tostring().equals("r")) {                     vejas.println("##3");             }                 if (ele4.text().tostring().equals("v")) {                     vejas.println("##4");             }                 if (ele4.text().tostring().equals("Šr")) {                     vejas.println("##5");             }                 if (ele4.text().tostring().equals("Šv")) {                     vejas.println("##6");             }                 if (ele4.text().tostring().equals("pv")) {                     vejas.println("##7");             }                 if (ele4.text().tostring().equals("pr")) {                     vejas.println("##8");             }                 element ele5=doc.select("dl.wind > dd > span.value.m_wind.ms").get(i); // 8 - 15                 temp.println(ele.text());                  if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.png")) {                     pav.println("##9");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.png")) {                     pav.println("##10");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.png")) {                     pav.println("##10");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.png")) {                     pav.println("##10");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.png")) {                     pav.println("##11");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r1.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r2.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r3.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r4.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r1.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r2.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r3.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r4.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r1.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r2.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r3.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r4.png")) {                     pav.println("##12");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r1.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r2.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r3.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r4.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.st.png")) {                     pav.println("##14");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.st.png")) {                     pav.println("##14");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.st.png")) {                     pav.println("##14");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.st.png")) {                     pav.println("##14");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r1.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r3.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.r4.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r1.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r3.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.r4.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r1.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r3.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.r4.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r1.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r3.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.r4.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c1.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c2.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c3.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("d.sun.c4.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.png")) {                     pav.println("##17");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.png")) {                     pav.println("##18");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.png")) {                     pav.println("##18");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.png")) {                     pav.println("##18");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.png")) {                     pav.println("##11");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r1.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r2.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r3.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r4.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r1.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r2.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r3.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r4.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r1.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r2.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r3.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r4.png")) {                     pav.println("##19");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r1.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r2.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r3.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r4.png")) {                     pav.println("##13");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.st.png")) {                     pav.println("##20");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.st.png")) {                     pav.println("##20");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.st.png")) {                     pav.println("##20");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.st.png")) {                     pav.println("##14");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r1.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r2.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r3.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.r4.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r1.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r2.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r3.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.r4.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r1.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r2.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r3.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.r4.st.png")) {                     pav.println("##21");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r1.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r2.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r3.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.r4.st.png")) {                     pav.println("##15");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c1.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c2.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c3.s4.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.s1.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.s2.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.s3.png")) {                     pav.println("##16");             }                 if (ele2.attr("src").substring(ele2.attr("src").lastindexof("/") + 1).trim().tostring().equals("n.moon.c4.s4.png")) {                     pav.println("##16");             }                 if (ele8.text().tostring().equals("jaunatis")) {                     menulis.println("##22");             }                 if (ele8.text().tostring().equals("priešpilnis")) {                     menulis.println("##23");             }                 if (ele8.text().tostring().equals("pilnatis")) {                     menulis.println("##24");             }                 if (ele8.text().tostring().equals("delčia")) {                     menulis.println("##25");             }                 atmosfera.println(ele3.text());                 greitis.println(ele5.text() + " m/s");                 dregnumas.println(ele6.text().substring(0, 4));                 faze.println(ele7.text());                     }                 temp.close();                    pav.close();                 atmosfera.close();                 vejas.close();                 greitis.close();                 dregnumas.close();                 faze.close();                 menulis.close();                     }             }     }); } } 

one problem in code did not start/make visible frame in swings edt (event dispatching thread). standard code looks like

java.awt.eventqueue.invokelater(new runnable() {         public void run() {             new myjframe().setvisible(true);         }     }); 

second: jframe should implement separate class avoid main / frame construction mess.

third: there exceptions while run code? how know code not run? did debug it?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -