0

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.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by yap_1991
0

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.

0

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?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.