This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, there, I have written many applications in GUI and generally endup in writing long codes,extending upto hundreds of lines Can anybody, tell me how do i reduce coding lines?? Other than deleting , of course!! eg.If i am using 10 buttons, i'l have to decalare and initialise them taking atleast 10 lines... Please guide me.... Bye Amol..
Less coding is very much achievable through code reuse. You can create and call a method that will do the basic intializations and then call this method wherever you are doing the initializations. This is one of the suggestions.
If you are having 10 buttons, you might be able to use a loop. You could put the labels in a vector. Another thought is to use default colors etc. Use default when you can. [This message has been edited by Randall Twede (edited March 07, 2001).]
GUI is almost never reusable , one day you come to work and someone has already changed my gui that it looked a day before and you have to work with an old stuff but the code that drives the gui stays the same that's what's good about it.