A GUI with dynamically changeable "inner view" of other components. [message #718092] |
Tue, 23 August 2011 08:33 |
Andreas Messages: 15 Registered: August 2011 |
Junior Member |
|
|
Hi guys.
I'm pretty new to GUI programming in general, and specifically to using WindowBuilder. I'm currently working on a database client, and was considering a layout as follows...
Basically, one should be able to view different table-entries in a component. However, as the type of table that the current entry belongs to will vary, so will the different fields for that entry.
For example, a user-table entry will have a name and a telephone number, etc. Whereas a item-table entry will have specifications for the item, like serial number and other stuff.
Now, I am considering a layout with for example a "main" JScrollPane that is used to view the table entries, but depending on what kind of entry is selected, I would like the JScrollPane to change its viewport-settings (JScrollPane.setViewportView(Component)) to different JPanels. This is ofcourse so that I can populate the various JPanels with the corrent fields depending on what kind of table the entry is selected from.
So I was wondering if you guys have any tips for how to structure a GUI like this, does it make sense to use a JScrollPane in the main application-window, or would you recommend something else? What other components are there that you can dynamically change the viewportview for?
Also, is JPanel what you would recommend to design the different table-entry-views with?
Any other advice is also greatly appreciated, this is my first bigger GUI application and I feel like I have a lot of questions in my head
// Andreas
[Updated on: Tue, 23 August 2011 08:34] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01989 seconds