I'm quite new in game programming an di have a few doubts about the relation between it and swing in java. I made some user interfaces using swing before, but when reading about making a game with it there are a lot of new points to take into account.
I know that swing and awt should not be fit together, but in many tutorial and sites it's used a canvas with jframe, i guess that would maybe be better the use of a jpanel and override the paint method?
And if i plan to add, let's say, diferent panels to the menu or so (of the game) can be done with the individual painting of different panels, adding to them swing elements (such as jlabels or jbuttons) or i have to make the method to paint and check the containing pixels for the events? I'm not sure if i explained myself correctly there, i mean if, for example, keep the central spot of a borderlayout to display things in a panel and then adding a whole different panel in the east spot to fill it with buttons, or has to be those buttons painted over the first one and build their own events.
Another thing is taht i've been said that the variables are for the methods and have to use getters and setters to get them, but so far i'm seeing all as static to catch them from outside, is this right to be done?
Also know that it should be have a permanent loop for it in the run method, i understand that, but i've seen different thoughs about the use of timers for triggering events. I don't really understand that, should use a counter for it? or use one of the timers already provided by java? and which timer would be used for such tasks? the swing or the util one :/