Results 1 to 7 of 7
Thread: GUI Planning?
- 03-24-2012, 01:50 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 33
- Rep Power
- 0
GUI Planning?
I was just wondering what the best way, or some ideas for ways, to design a program with multiple pages would be. For example say I want a welcome page that allows the user to create a project. Once the user clicks "Create Project" I want that screen to disappear and a second page to appear with new GUI Components for the user to see. In order to keep organized and have a well designed program, how would one go about this? Would you just create a new .java file for each screen/page? I have tried it all in one file and it just gets clustered beyond belief.
Any ideas would be appreciated! Thank you!
- Tombomb
- 03-24-2012, 07:09 PM #2
Member
- Join Date
- Jan 2012
- Posts
- 33
- Rep Power
- 0
Re: GUI Planning?
Anything? :/
-
Re: GUI Planning?
CardLayout would work well for swapping components dynamically
Yes, this would make the most sense to me.In order to keep organized and have a well designed program, how would one go about this? Would you just create a new .java file for each screen/page?
Vut having said this, I would recommend that you first work on the non-GUI "brains" part of your code first, the "model" that the GUI is built around since this is ultimately more important than the GUI itself.
- 03-24-2012, 08:25 PM #4
Member
- Join Date
- Jan 2012
- Posts
- 33
- Rep Power
- 0
Re: GUI Planning?
I'll look into this for swapping the components out. I was also instructed by a professor that high level GUI's in java used GridBagLayout to place components because you have total control of where they are placed, unlike GridLayout or BorderLayout.CardLayout would work well for swapping components dynamically
Okay I'll do it that way, and I totally agree. I am re-doing a program I have written most of and I did the GUI at the same time as the Computational Object and its gotten mixed in and very messy.Yes, this would make the most sense to me.
Vut having said this, I would recommend that you first work on the non-GUI "brains" part of your code first, the "model" that the GUI is built around since this is ultimately more important than the GUI itself.
Thank you for your response!
-
Re: GUI Planning?
With all due regard to your instructor, that statement seems overly simplistic by a long shot. Complex GUI's may use GridBagLayout, but often can obtain the layout desired and in a far easier fashion using nested JPanels, each using a more coder-friendly layout such as GridLayout, BoxLayout, BorderLayout, etc,... and yes sometimes even nested in combination with GridBagLayout.
My pleasure!Thank you for your response!
- 03-24-2012, 09:03 PM #6
Member
- Join Date
- Jan 2012
- Posts
- 33
- Rep Power
- 0
Re: GUI Planning?
Yeah the way I was doing it before was nesting JPanels like crazy to get stuff where I wanted it lol.... It was kind of annoying actually but I probably didn't design it very well hah :/
- 03-27-2012, 03:07 AM #7
Similar Threads
-
Planning projects
By jammas615 in forum Advanced JavaReplies: 2Last Post: 10-08-2011, 03:43 PM -
I need help planning.
By AcousticBruce in forum New To JavaReplies: 2Last Post: 02-26-2011, 04:22 PM -
program to assist in planning forms
By shags_j in forum SWT / JFaceReplies: 6Last Post: 11-02-2009, 05:04 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks