|
Replies:
2
-
Last Post:
May 22, 2008 8:14 AM
by: aberrant
|
|
|
|
|
|
|
Starting point to understand inside Swing
Posted:
May 21, 2008 9:41 PM
|
|
|
Hi guys, Im very impressed and excited to found there are so many great swing component here. I'm an junior programmer in one of software company in japan and hoping someday could hack into swing to making some advance component based on swing. What do i have to studying as a starting point to understand the mechanism inside swing? and what thing we have to studying to be able create swingx like component.
Thank, any commet would be very appreciated.
Best Regards Gusti
|
|
|
|
|
|
|
Re: Starting point to understand inside Swing
Posted:
May 22, 2008 2:08 AM
in response to: gusti_andika
|
|
|
Swing is based on model-view-controller(MVC), so in order to understand swing you have to understand MVC. This is the way Swing controls what to display, how to display it and eventually what will happen to it. All swing components have a GUI and a model + different types of listeners that have to be implemented in order to create an action when something happens in the model or GUI. So basically swing says: don't update the GUI I will update it for you if you update the model. Swing needs an event to be fired in order to do this and in order to create advanced "new" components you have to make and fire that event in the model.
The more advanced underlying mechanisms such as Look & Feel that tells the GUI how to draw itself is a huge topic, and is something that gives swing the power to do "anything".
If you take a look at some of the UI classes in swing you will se that they implement som sort of logic that tells the component that uses the UI class how to be painted.
So to answer your question you have to understand at least: -MVC -Events and Actions -Listeners -How to paint a component (UI) -Graphics + Graphics2D -Interfaces
You can propably create swingx like components without understandig all above, but in order to make it work properly you have to have an understanding of all the above.
But as a starter, you should first learn how the existing swing components work 
Cheers.
|
|
|
|
|
|
|