I have 2 Classes.
- GUI (with main method in it)
- Parser (this reads files(csv), works with them and then writes a new file)
I have a TextArea in my GUI which should be the logwindow.
in this window i want information from my parser class hence i created the following parts:
//object that should be accessible from the GUI class
private String logText;
// in this part of the parser class i go through each line of the file
// i want the first line in my log (next)
while (sc.hasNextLine()) {
prev = curr;
curr = next;
next = sc.nextLine();
if(onlyonce=true){
logText=x;
onlyonce=false;
}
this code enables me to get the first line of code and put it into a private attribute of the class.
how can i get this information into my gui class?
any suggestions.
regards
set value in
parserclassThen Create Object in
GUIclass andgetvalueas like as set value. You can also usegettersettermethod!