Reputation: 21
I have written a simple Command-Line programm that disolves car license plates. like:
Now I want to make a simple GUI (its my first gui) for that programm. here're my classes:
Dissolver.java // dissolves car plates ; and contains whole logic
DissolverGUI.java // gui for Dissolver
My problem is: where should I create my object of Dissolver in the DissolverGui class?
I hope you are able to understand my problem
Upvotes: 2
Views: 666
Reputation: 64622
Your question is too broad. It's hard to give an advice without seeing the code. You can try adding a field in DissolverGui
class referencing Dissolver
and use it from all methods. Suppose the right place to create it is the public static void main(String[])
method which will run the whole program.
As a beginner do not bother yourself about the style, just make the program work as you want.
Upvotes: 3