hello

From the beginning of my programming life in java, all I learned is how to hard code the gui into the windows. But now I need to do soemthing that need the help of dynamic GUI. Let say I have 3 buttons that I need to put onto the interface, but the next time I run it program , I might only need 2 button...I tried searching but nothing is found....Is there some information on how to program this kind of GUI on the net that I can read?...

sorry for my poor grammer