You will learn a lot of experience.
Many of the most advanced interfaces are no longer even like Java. At least the top level extends JComponent , but buttons do not have to. The main application can use custom drawing methods for custom views or other libraries to display 3D images. After you have experience using many different components and libraries, you will begin to see how they can all come together to form a cohesive application.
To solve issues related to the object model, there are definitely separate classes from your objects to display them. One object can ultimately be used by different parts of your application, transmitted over networks, displayed on screens, sent as text or any number of different things. If you try to put all this code in your object model, it will be a complete mess.
Try creating common sense methods for your objects. Think about what methods, questions, properties will be used by all the different parts of your application when interacting with these objects. Whatever is disposable and useful in only one place, do not put it in your main classes of objects.
Also, remember that you can always move functionality. Using a good IDE, such as Eclipse, makes it easy to pull or push methods, properties, and other parts of a class into a superclass or subclass. If you write some functions related to an object, put it in a module that uses it. When you need the same functionality in another module, move it to your object model so that it can be shared. This is easy to do with the right tools.
source share