Interface and executor
I'm writing a program in java to draw graphs. Now my question: I use swing for user interface and i want a separate object for de code behind the user interface object( i do this because i can reuse my user interface object later ). For the moment the executor object owns the user interface object( an JPanelExecutor owns a JPanel) and the upper object ( the JFrame ) owns all the executors. Should i do it like this or are there other ways to do this?
(Sorry for my English, i'm belgian)
Many ways can be made to work. The one you describe can be made to work.
Try googling "model view controller pattern" for a standard way to do what you describe.
thanks, this is a reallt good tip, many thanks!