Hi can some one tell how do I start working on GUI ? Can somebody explain the GUI archetecture here? I have the tentative layout of the GUI component. I have four panels. Panel1 consists of input details such as origin, destination, flight no, carrier etc. Panel2 consists of JTable to show the results after the Query button in panel1 is clicked. JTable will be in Single selection mode. A row selected in JTable is displayed in panel3(booking panel). Basically this will contain only one row. This panel also consists of provision to enter the no of seats to be reserverved. The fourth panlel will simply displays the status of any operation. I am able to develop input panel separatly. However I am stuck with the JTable. Do I need to develop TableModel and then implement ? Or a Simple Table would be sufficient ?. Also How do I write an event model that If I press Query it should update ther Table with the data from Database. Clicking on Book button shoud make a call to database and then update the JTable. So Can some body throw their ideas on the archetecture of the GUI here ?
Well, you have asked questions that make it large in scope. The best way to help you out is to look at the Model-View-Controller Design Pattern that is needed for GUIs. By separated the three parts into their own classes. The Model being a representation of the data, and the view being the display. The controller will be the listener of the view. The JTable uses this model, and it would be best for you to create a subclass of AbstractDataModel, and use that in your JTable. That is the quick once over. You should check out Sun's tutorial on Swing, or some other fine manual on Swing Hope that helps point you in some direction Mark