I'm now scraping information from an HTML webpage, it will count and
arrangement all a occurrences of a specific add-on (e.g find all tables in
a page) for preference of one of these occurrences. we have populated a
JSpinner for all a occurrences (0->9 for 10 add-on occurrences) so that a
specific component can be extracted. Although we am carrying problem in
accessing a quarrel value specified in a spinner from a opposite class, as
we would like on a symbol click for it to tie a window and a value will be
afterwards used by a other category to name a component and scratch a
data.Here is my tide formula for a preference window (DataSelection
Class):okBtn.addActionListener(new ActionListener() { @Override open
vacant actionPerformed(ActionEvent e) { //get user preference
int quarrel = (int) model.getValue(); //Close JFrame
frame.setVisible(false); frame.dispose(); }});This is a domain
where we need to use this quarrel integer value (Model Class): private
vacant HTMLScrape(Document d) throws Exception { Elements elts =
d.getElementsByTag(tagType); // finds all component count =
elts.size();//Initialise count to series of occurrences found //No
Occurences Found in Input Source if (count == 0) { detect =
("No tables found! Please check source.");
JOptionPane.showMessageDialog(null, detect, " - ERROR - ",
JOptionPane.ERROR_MESSAGE); } else if (count > 0) {
ds.createSelection(d, tagType); //displays preference window to user
Element preference = elts.get(INPUT VALUE HERE); //create component
from user inputI can simply imitation it out in a dataselection class,
only can't seem to work out how to get it from a other class. Any ideas on
how to swell here?
No comments:
Post a Comment