i have GUI class named 'myGUI' where contains textField, button, textArea and so on....
the code like this:
p2.add(c=new Label("Type name to search:"));
p2.add(m=new TextField(10));
p2.add(b=new Button ("SEARCH")); b.addActionListener(this);
p.add(k= new Label("CLICK SEARCH TO START ACTION")
p1.add(t=new TextArea(""), BorderLayout.CENTER);
i have another class file named 'searchCompare' where user able to key in to find a string and see the results with similarity score and path.
the code like this :
Scanner scanner = new Scanner(System.in);
String SearchClass;
System.out.print("Enter namt to Search : ");
SearchClass = scanner.next();
for (String found: names) {
double compare = ReadFilesAndCompare.LCS(found, SearchClass);
if (compare !=null) {
System.out.println("Found names : "+found+ " Similarity score: " +compare+ "File Name: "+found.toString()); }
else {System.out.println("No search result found"); }
}
individualy both r working correctly... but now want to connect this 'searchComare' class with 'myGui' class where user will input search name in textFiled and press start button to search and get results in the textArea.
how can i do this ?? anybody can pls help me... i m very new in java