A blue passenger train moves southwards at a speed of 120km/hr. Unfortunately as it enters a junction it collides with a brown goods train moving northwards. The collision happened 50 minutes after the goods train takes off. Using a Java program illustrate the answer.
We don't do people's homework for them.
If you have a specific problem with some aspect of Java then we're glad to help, but simply copy/pasting your assignment and waiting for an answer is just insulting.
DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules
Post what you have done so far and someone will help you from there.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...