Hi all,

I have a GUI and working programs, however I need to put the program into the GUI to make it work, but im experiencing the problem that my GUI codes are all in a class and my codes are in man different classes, is there a way to use my GUI codes to "call" them into the GUI? So that it makes things easier for me to just change the codes of the programs instead of adding them into my GUI.

Appreciate if anyone could provide me some help. Thanks.

from your GUI class, you can instantiate objects in its actionPerformed method. then simply call the methods on those objects (of your other program). you might then have to add the program results to the GUI. if you check javas API, there are numerous ways to add things to the GUI.

I've tried this,

public void actionPerformed(ActionEvent e) {
    			if(target3.isSelected() && query3.isSelected() && DynPro.isSelected()) {
    				System.out.println("Sequence 1: "+seq1.getText());
    				System.out.println("Sequence 2: "+seq2.getText());
    				 MatchApplet DPTest = new MatchApplet();
    				 screen.add(); //what do i add here?

I've tried calling the method of the file, but how to i display the result from that file into my GUI?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.