Theory of GUI Creation Code Layout?

This question is not so much "How to create gui", but more "where to create gui".

I have Java code that checks if the necessary drivers are needed:

public boolean confirmDrivers() { 
       /* some logic */ 
       return someDriver.exists();
}

It is called as:

if (confirmDrivers()) {
       createGUI();              
}

Is it a bad idea for action definitions to be defined for some buttons in createGUI ()? this seems inappropriate because this function is basically just assigned (ie myButton.setToolTipText ("hay guyz click here!");), and listeners contain little logic (mainly for calling other functions containing DO logic.

Just curious what others are doing in this situation.

+3
source share
1 answer

GUI - . GUI , , , -. - :

if (confirmDrivers()) {
    new GUI(someBusinessLogicController);
}
+1

Source: https://habr.com/ru/post/1704205/


All Articles