This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am to new to swing.When i search tutorial for swing i see that most of them create gui in static method .What is the purpose of it .When i make gui in static method i am not able to add listener for it.Can anyone please tell me what is the preferred way of developing desktop application using swing. Thanks
I assume you are talking about something like this:
The reason that createAndShowGUI() is static is because it's being called from a static method, main(String args). You can not call non-static methods from a static method, so createAndShowGUI() has to be static.